flo-mat 2.0.1 → 2.0.2
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/.eslintrc.cjs +69 -0
- package/README.md +9 -27
- package/browser/index.js +29720 -7125
- package/browser/index.min.js +1 -2
- package/node/circle.js +3 -3
- package/node/circle.js.map +1 -1
- package/node/compare-curvatures-at-interface.js +36 -36
- package/node/compare-curvatures-at-interface.js.map +1 -1
- package/node/cp-node/clone.js +6 -6
- package/node/cp-node/clone.js.map +1 -1
- package/node/cp-node/remove.js +4 -4
- package/node/cp-node/remove.js.map +1 -1
- package/node/cp-node.js +18 -18
- package/node/cp-node.js.map +1 -1
- package/node/curve.d.ts +1 -1
- package/node/curve.js +19 -19
- package/node/curve.js.map +1 -1
- package/node/debug/debug.d.ts +1 -1
- package/node/debug/functions/draw-elem/bounding-hull.js +1 -1
- package/node/debug/functions/draw-elem/bounding-hull.js.map +1 -1
- package/node/debug/functions/draw-elem/branch.js +4 -4
- package/node/debug/functions/draw-elem/branch.js.map +1 -1
- package/node/debug/functions/draw-elem/culls.js +4 -4
- package/node/debug/functions/draw-elem/culls.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-circle-percent.js +1 -1
- package/node/debug/functions/draw-elem/draw-circle-percent.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-elem.d.ts +2 -2
- package/node/debug/functions/draw-elem/draw-elem.js +1 -1
- package/node/debug/functions/draw-elem/draw-elem.js.map +1 -1
- package/node/debug/functions/draw-elem/dull-corner.js +3 -3
- package/node/debug/functions/draw-elem/dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/leaves.js +4 -4
- package/node/debug/functions/draw-elem/leaves.js.map +1 -1
- package/node/debug/functions/draw-elem/loose-bounding-box.js +2 -2
- package/node/debug/functions/draw-elem/loose-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/mat.js +4 -4
- package/node/debug/functions/draw-elem/mat.js.map +1 -1
- package/node/debug/functions/draw-elem/max-vertex.js +2 -2
- package/node/debug/functions/draw-elem/max-vertex.js.map +1 -1
- package/node/debug/functions/draw-elem/min-y.js +3 -3
- package/node/debug/functions/draw-elem/min-y.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +4 -4
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong.js +4 -4
- package/node/debug/functions/draw-elem/one-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/sharp-corner.js +2 -2
- package/node/debug/functions/draw-elem/sharp-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/three-prong.js +7 -7
- package/node/debug/functions/draw-elem/three-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/tight-bounding-box.js +1 -1
- package/node/debug/functions/draw-elem/tight-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/two-prong.js +1 -1
- package/node/debug/functions/draw-elem/two-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/vertex.js +13 -13
- package/node/debug/functions/draw-elem/vertex.js.map +1 -1
- package/node/debug/functions/general.d.ts +1 -1
- package/node/debug/functions/general.js +1 -1
- package/node/debug/functions/general.js.map +1 -1
- package/node/debug/functions/three-prong.d.ts +1 -1
- package/node/debug/functions/three-prong.js +37 -37
- package/node/debug/functions/three-prong.js.map +1 -1
- package/node/debug/functions/two-prong.d.ts +1 -1
- package/node/debug/functions/two-prong.js +15 -15
- package/node/debug/functions/two-prong.js.map +1 -1
- package/node/find-mats.js +16 -19
- package/node/find-mats.js.map +1 -1
- package/node/get-boundary-bezier-parts-to-next.js +8 -8
- package/node/get-boundary-bezier-parts-to-next.js.map +1 -1
- package/node/get-boundary-beziers-to-next.js +8 -8
- package/node/get-boundary-beziers-to-next.js.map +1 -1
- package/node/get-branches.js +7 -7
- package/node/get-branches.js.map +1 -1
- package/node/get-curve/get-curve-between.js +21 -21
- package/node/get-curve/get-curve-between.js.map +1 -1
- package/node/get-curve/get-edge-direction.js +13 -13
- package/node/get-curve/get-edge-direction.js.map +1 -1
- package/node/get-interface-ccw.js +12 -12
- package/node/get-interface-ccw.js.map +1 -1
- package/node/loop/get-max-coordinate.js +9 -9
- package/node/loop/get-max-coordinate.js.map +1 -1
- package/node/loop.js +4 -4
- package/node/loop.js.map +1 -1
- package/node/mat/add-to-cp-graph.js +8 -8
- package/node/mat/add-to-cp-graph.js.map +1 -1
- package/node/mat/closest-boundary-point/closest-points-on-curve.js +5 -6
- package/node/mat/closest-boundary-point/closest-points-on-curve.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +5 -5
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +5 -5
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js.map +1 -1
- package/node/mat/closest-boundary-point/get-best-distance-squared.js +5 -5
- package/node/mat/closest-boundary-point/get-best-distance-squared.js.map +1 -1
- package/node/mat/closest-boundary-point/get-close-boundary-points.js +15 -15
- package/node/mat/closest-boundary-point/get-close-boundary-points.js.map +1 -1
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js +4 -4
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js.map +1 -1
- package/node/mat/create-new-cp-tree.js +3 -3
- package/node/mat/create-new-cp-tree.js.map +1 -1
- package/node/mat/elem-type-two-prong.d.ts +1 -1
- package/node/mat/find-mat/add-1-prong.js +3 -3
- package/node/mat/find-mat/add-1-prong.js.map +1 -1
- package/node/mat/find-mat/add-2-prong.js +40 -40
- package/node/mat/find-mat/add-2-prong.js.map +1 -1
- package/node/mat/find-mat/add-3-prong.js +1 -1
- package/node/mat/find-mat/add-3-prong.js.map +1 -1
- package/node/mat/find-mat/add-debug-info.js +16 -18
- package/node/mat/find-mat/add-debug-info.js.map +1 -1
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js +4 -4
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js.map +1 -1
- package/node/mat/find-mat/create-initial-cp-graph.js +11 -11
- package/node/mat/find-mat/create-initial-cp-graph.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/add-debug-info.js +2 -2
- package/node/mat/find-mat/find-2-prong/add-debug-info.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +5 -5
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/find-2-prong.js +25 -25
- package/node/mat/find-mat/find-2-prong/find-2-prong.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js +7 -7
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +4 -4
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/x-for-debugging.d.ts +1 -1
- package/node/mat/find-mat/find-3-prong/calc-better-x.js +4 -4
- package/node/mat/find-mat/find-3-prong/calc-better-x.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +3 -3
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +35 -35
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/find-3-prong.js +14 -14
- package/node/mat/find-mat/find-3-prong/find-3-prong.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/get-closest-points.js +1 -1
- package/node/mat/find-mat/find-3-prong/get-closest-points.js.map +1 -1
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +2 -2
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js.map +1 -1
- package/node/mat/find-mat/find-and-add-2-prongs.js +12 -13
- package/node/mat/find-mat/find-and-add-2-prongs.js.map +1 -1
- package/node/mat/find-mat/find-and-add-3-prongs.js +16 -17
- package/node/mat/find-mat/find-and-add-3-prongs.js.map +1 -1
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +6 -6
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js.map +1 -1
- package/node/mat/find-mat/get-potential-2-prongs.js +4 -4
- package/node/mat/find-mat/get-potential-2-prongs.js.map +1 -1
- package/node/mat/find-mat/get-sharp-corners.js +4 -4
- package/node/mat/find-mat/get-sharp-corners.js.map +1 -1
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +3 -3
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
- package/node/mat/get-boundary-piece-beziers.js +5 -5
- package/node/mat/get-boundary-piece-beziers.js.map +1 -1
- package/node/mat/get-contact-circles-at-interface.js +1 -1
- package/node/mat/get-contact-circles-at-interface.js.map +1 -1
- package/node/mat/get-leaves.js +2 -2
- package/node/mat/get-leaves.js.map +1 -1
- package/node/mat/get-neighboring-cps.js +1 -1
- package/node/mat/get-neighboring-cps.js.map +1 -1
- package/node/mat/is-another-cp-closeby.js +9 -9
- package/node/mat/is-another-cp-closeby.js.map +1 -1
- package/node/mat/simplify-mat-map-only.js +15 -15
- package/node/mat/simplify-mat-map-only.js.map +1 -1
- package/node/mat/to-scale-axis/add-debug-info.js +1 -1
- package/node/mat/to-scale-axis/add-debug-info.js.map +1 -1
- package/node/mat/to-scale-axis/cull-non-cycles.js +5 -5
- package/node/mat/to-scale-axis/cull-non-cycles.js.map +1 -1
- package/node/mat/to-scale-axis/cull.js +5 -5
- package/node/mat/to-scale-axis/cull.js.map +1 -1
- package/node/mat/trim-mat.js +1 -1
- package/node/mat/trim-mat.js.map +1 -1
- package/node/point-on-shape.d.ts +4 -4
- package/node/point-on-shape.js +16 -16
- package/node/point-on-shape.js.map +1 -1
- package/node/simplify-mat.js +10 -10
- package/node/simplify-mat.js.map +1 -1
- package/node/svg/get-loop-bounds.d.ts +1 -1
- package/node/svg/get-loop-bounds.js +13 -13
- package/node/svg/get-loop-bounds.js.map +1 -1
- package/node/svg/get-shape-bounds.d.ts +2 -2
- package/node/svg/get-shape-bounds.js +4 -4
- package/node/svg/get-shape-bounds.js.map +1 -1
- package/node/sweep-line/sweep-line.js +8 -8
- package/node/sweep-line/sweep-line.js.map +1 -1
- package/node/to-scale-axis.js +16 -15
- package/node/to-scale-axis.js.map +1 -1
- package/node/traverse-edges.js +2 -2
- package/node/traverse-edges.js.map +1 -1
- package/node/traverse-vertices.js +2 -2
- package/node/traverse-vertices.js.map +1 -1
- package/package.json +28 -23
- package/src/circle.ts +3 -3
- package/src/compare-curvatures-at-interface.ts +36 -36
- package/src/cp-node/clone.ts +6 -6
- package/src/cp-node/remove.ts +4 -4
- package/src/cp-node.ts +20 -20
- package/src/curve.ts +19 -19
- package/src/debug/functions/draw-elem/bounding-hull.ts +2 -2
- package/src/debug/functions/draw-elem/branch.ts +4 -4
- package/src/debug/functions/draw-elem/culls.ts +4 -4
- package/src/debug/functions/draw-elem/draw-circle-percent.ts +2 -2
- package/src/debug/functions/draw-elem/draw-elem.ts +1 -1
- package/src/debug/functions/draw-elem/dull-corner.ts +3 -3
- package/src/debug/functions/draw-elem/leaves.ts +4 -4
- package/src/debug/functions/draw-elem/loose-bounding-box.ts +2 -2
- package/src/debug/functions/draw-elem/mat.ts +4 -4
- package/src/debug/functions/draw-elem/max-vertex.ts +2 -2
- package/src/debug/functions/draw-elem/min-y.ts +3 -3
- package/src/debug/functions/draw-elem/one-prong-at-dull-corner.ts +4 -4
- package/src/debug/functions/draw-elem/one-prong.ts +4 -4
- package/src/debug/functions/draw-elem/sharp-corner.ts +2 -2
- package/src/debug/functions/draw-elem/three-prong.ts +7 -7
- package/src/debug/functions/draw-elem/tight-bounding-box.ts +1 -1
- package/src/debug/functions/draw-elem/two-prong.ts +1 -1
- package/src/debug/functions/draw-elem/vertex.ts +20 -14
- package/src/debug/functions/general.ts +3 -3
- package/src/debug/functions/three-prong.ts +37 -37
- package/src/debug/functions/two-prong.ts +15 -15
- package/src/find-mats.ts +19 -19
- package/src/get-boundary-bezier-parts-to-next.ts +8 -8
- package/src/get-boundary-beziers-to-next.ts +8 -8
- package/src/get-branches.ts +7 -7
- package/src/get-curve/get-curve-between.ts +21 -21
- package/src/get-curve/get-edge-direction.ts +13 -14
- package/src/get-interface-ccw.ts +12 -12
- package/src/loop/get-max-coordinate.ts +7 -7
- package/src/loop.ts +4 -4
- package/src/mat/add-to-cp-graph.ts +8 -8
- package/src/mat/closest-boundary-point/closest-points-on-curve.ts +5 -6
- package/src/mat/closest-boundary-point/cull-bezier-pieces.ts +1 -1
- package/src/mat/closest-boundary-point/cull-by-loose-bounding-box.ts +5 -5
- package/src/mat/closest-boundary-point/cull-by-tight-boundary-box.ts +5 -5
- package/src/mat/closest-boundary-point/get-best-distance-squared.ts +5 -5
- package/src/mat/closest-boundary-point/get-close-boundary-points.ts +15 -15
- package/src/mat/closest-boundary-point/get-closest-boundary-point.ts +4 -4
- package/src/mat/cmp-cp-on-delta.ts +5 -5
- package/src/mat/create-new-cp-tree.ts +3 -3
- package/src/mat/find-mat/add-1-prong.ts +5 -5
- package/src/mat/find-mat/add-2-prong.ts +42 -42
- package/src/mat/find-mat/add-3-prong.ts +1 -1
- package/src/mat/find-mat/add-debug-info.ts +18 -20
- package/src/mat/find-mat/create-get-interesting-points-on-loop.ts +4 -4
- package/src/mat/find-mat/create-initial-cp-graph.ts +11 -11
- package/src/mat/find-mat/find-2-prong/add-debug-info.ts +4 -4
- package/src/mat/find-mat/find-2-prong/cull-bezier-pieces.ts +5 -5
- package/src/mat/find-mat/find-2-prong/find-2-prong.ts +27 -27
- package/src/mat/find-mat/find-2-prong/find-equidistant-point-on-line.ts +7 -7
- package/src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts +4 -4
- package/src/mat/find-mat/find-3-prong/calc-better-x.ts +4 -4
- package/src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts +3 -3
- package/src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts +37 -37
- package/src/mat/find-mat/find-3-prong/find-3-prong.ts +16 -16
- package/src/mat/find-mat/find-3-prong/get-closest-points.ts +1 -1
- package/src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts +2 -2
- package/src/mat/find-mat/find-and-add-2-prongs.ts +14 -16
- package/src/mat/find-mat/find-and-add-3-prongs.ts +19 -19
- package/src/mat/find-mat/find-and-add-hole-closing-2-prongs.ts +6 -6
- package/src/mat/find-mat/get-potential-2-prongs.ts +4 -4
- package/src/mat/find-mat/get-sharp-corners.ts +4 -4
- package/src/mat/find-mat/get-total-abs-curvature.ts +1 -1
- package/src/mat/geometry/get-closest-squared-distance-to-rotated-rect.ts +3 -3
- package/src/mat/get-boundary-piece-beziers.ts +5 -5
- package/src/mat/get-contact-circles-at-interface.ts +1 -1
- package/src/mat/get-edges-as-array.ts +2 -2
- package/src/mat/get-leaves.ts +2 -2
- package/src/mat/get-neighboring-cps.ts +1 -1
- package/src/mat/is-another-cp-closeby.ts +9 -9
- package/src/mat/simplify-mat-map-only.ts +15 -15
- package/src/mat/to-scale-axis/add-debug-info.ts +6 -3
- package/src/mat/to-scale-axis/add-to-tree.ts +10 -10
- package/src/mat/to-scale-axis/calc-groups.ts +19 -19
- package/src/mat/to-scale-axis/create-spacial-tree.ts +4 -4
- package/src/mat/to-scale-axis/cull-non-cycles.ts +5 -5
- package/src/mat/to-scale-axis/cull.ts +5 -5
- package/src/mat/to-scale-axis/get-engulfed-vertices.ts +18 -18
- package/src/mat/trim-mat.ts +1 -1
- package/src/point-on-shape.ts +16 -16
- package/src/simplify-mat.ts +10 -10
- package/src/svg/get-curvature-at-interface.ts +6 -8
- package/src/svg/get-extreme.ts +1 -1
- package/src/svg/get-loop-bounds.ts +13 -13
- package/src/svg/get-shape-bounds.ts +4 -4
- package/src/sweep-line/are-boxes-intersecting.ts +4 -4
- package/src/sweep-line/sweep-line.ts +8 -8
- package/src/to-scale-axis.ts +18 -17
- package/src/traverse-edges.ts +2 -2
- package/src/traverse-vertices.ts +2 -2
- package/webpack.config.cjs +12 -63
- package/browser/index.min.js.LICENSE.txt +0 -2819
- package/browser/index.module.js +0 -7149
- package/browser/index.module.min.js +0 -2
- package/browser/index.module.min.js.LICENSE.txt +0 -2819
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { drawFs } from "flo-draw";
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function looseBoundingBox(g, box) {
|
|
4
|
-
|
|
4
|
+
const [[x0, y0], [x1, y1]] = box;
|
|
5
5
|
box = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];
|
|
6
|
-
|
|
6
|
+
const $box = drawFs.polygon(g, box, 'thin5 brown nofill');
|
|
7
7
|
return $box;
|
|
8
8
|
}
|
|
9
9
|
export { looseBoundingBox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loose-bounding-box.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/loose-bounding-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,gBAAgB,CAAC,CAAc,EAAE,GAAe;IAExD,
|
|
1
|
+
{"version":3,"file":"loose-bounding-box.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/loose-bounding-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,gBAAgB,CAAC,CAAc,EAAE,GAAe;IAExD,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;IAChC,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC,EAAE,EAAC,EAAE,CAAC,EAAC,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,oBAAoB,CAAC,CAAC;IAE1D,OAAO,IAAI,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -3,21 +3,21 @@ import { traverseEdges } from '../../../traverse-edges.js';
|
|
|
3
3
|
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
4
4
|
/** @hidden */
|
|
5
5
|
function drawMat(type) {
|
|
6
|
-
|
|
6
|
+
const classes = type === 'mat'
|
|
7
7
|
? 'thin5 purple nofill'
|
|
8
8
|
: 'thin10 red nofill';
|
|
9
9
|
return (g, mat) => {
|
|
10
|
-
|
|
10
|
+
const cpNode = mat.cpNode;
|
|
11
11
|
if (!cpNode) {
|
|
12
12
|
return undefined;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
const $svgs = [];
|
|
15
15
|
let i = 0;
|
|
16
16
|
traverseEdges(cpNode, cpNode => {
|
|
17
17
|
if (cpNode.isTerminating()) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
const bezier = getCurveToNext(cpNode);
|
|
21
21
|
if (!bezier) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mat.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/mat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,cAAc;AACd,SAAS,OAAO,CAAC,IAAmB;IAEhC,
|
|
1
|
+
{"version":3,"file":"mat.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/mat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,cAAc;AACd,SAAS,OAAO,CAAC,IAAmB;IAEhC,MAAM,OAAO,GAAW,IAAI,KAAK,KAAK;QAClC,CAAC,CAAC,qBAAqB;QACvB,CAAC,CAAC,mBAAmB,CAAC;IAE1B,OAAO,CAAC,CAAc,EAAE,GAAQ,EAAE,EAAE;QAChC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAE1B,IAAI,CAAC,MAAM,EAAE;YAAE,OAAO,SAAS,CAAC;SAAE;QAElC,MAAM,KAAK,GAAiB,EAAE,CAAC;QAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC3B,IAAI,MAAM,CAAC,aAAa,EAAE,EAAE;gBAAE,OAAO;aAAE;YAEvC,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;YAEtC,IAAI,CAAC,MAAM,EAAE;gBAAE,OAAO;aAAE;YAExB,CAAC,EAAE,CAAC;YAEJ,KAAK,CAAC,IAAI,CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAA,WAAW,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACjB,CAAC,CAAA;AACL,CAAC;AAGD,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { drawFs } from 'flo-draw';
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function maxVertex(g, cpNode) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const circle = cpNode.cp.circle;
|
|
5
|
+
const $elems = drawFs.circle(g, circle, 'brown thin10 nofill');
|
|
6
6
|
return $elems;
|
|
7
7
|
}
|
|
8
8
|
export { maxVertex };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"max-vertex.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/max-vertex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,SAAS,CAAC,CAAc,EAAE,MAAc;IAC7C,
|
|
1
|
+
{"version":3,"file":"max-vertex.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/max-vertex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,SAAS,CAAC,CAAc,EAAE,MAAc;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAElE,OAAO,MAAM,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -2,12 +2,12 @@ import { toCubic, evalDeCasteljau } from 'flo-bezier3';
|
|
|
2
2
|
import { drawFs } from 'flo-draw';
|
|
3
3
|
/** @hidden */
|
|
4
4
|
function minY(g, pos) {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const p = evalDeCasteljau(pos.curve.ps, pos.t);
|
|
6
|
+
const ps = toCubic(pos.curve.ps);
|
|
7
7
|
//console.log('x: ', getX(ps));
|
|
8
8
|
//console.log('y: ', getY(ps));
|
|
9
9
|
//console.log('t: ', pos.t);
|
|
10
|
-
|
|
10
|
+
const $elems = drawFs.crossHair(g, p, 'red thin10 nofill');
|
|
11
11
|
return $elems;
|
|
12
12
|
}
|
|
13
13
|
export { minY };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"min-y.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/min-y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,IAAI,CAAC,CAAc,EAAE,GAAkB;IAC5C,
|
|
1
|
+
{"version":3,"file":"min-y.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/min-y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,IAAI,CAAC,CAAc,EAAE,GAAkB;IAC5C,MAAM,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,CAAE;IAEhD,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjC,+BAA+B;IAC/B,+BAA+B;IAC/B,4BAA4B;IAE5B,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CACvB,CAAC,EAAE,CAAC,EAAE,mBAAmB,CACnC,CAAC;IAEC,OAAO,MAAM,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -3,10 +3,10 @@ import { getOsculatingCircle } from '../../../point-on-shape.js';
|
|
|
3
3
|
/** @hidden */
|
|
4
4
|
function oneProngAtDullCorner(g, pos) {
|
|
5
5
|
//let oCircle = PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const oCircle = getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
7
|
+
const $center = drawFs.dot(g, pos.p, 0.1, 'orange');
|
|
8
|
+
const $circle = drawFs.dot(g, oCircle.center, 0.25, 'orange');
|
|
9
|
+
const $pos = drawFs.circle(g, oCircle, 'orange thin10 nofill');
|
|
10
10
|
return [...$center, ...$circle, ...$pos];
|
|
11
11
|
}
|
|
12
12
|
export { oneProngAtDullCorner };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one-prong-at-dull-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/one-prong-at-dull-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAiB,MAAM,4BAA4B,CAAC;AAGhF,cAAc;AACd,SAAS,oBAAoB,CAAC,CAAc,EAAE,GAAkB;IAC5D,gFAAgF;IAChF,
|
|
1
|
+
{"version":3,"file":"one-prong-at-dull-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/one-prong-at-dull-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAiB,MAAM,4BAA4B,CAAC;AAGhF,cAAc;AACd,SAAS,oBAAoB,CAAC,CAAc,EAAE,GAAkB;IAC5D,gFAAgF;IAChF,MAAM,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IAEnE,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC;IAErE,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AAC1C,CAAC;AAGD,OAAO,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -5,12 +5,12 @@ import { scaleCircle } from '../../../circle.js';
|
|
|
5
5
|
const scaleFactor = 0.5;
|
|
6
6
|
/** @hidden */
|
|
7
7
|
function drawOneProng(g, pos, classes, delay = 0) {
|
|
8
|
-
|
|
8
|
+
const circle = scaleCircle(
|
|
9
9
|
//PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos),
|
|
10
10
|
getOsculatingCircle(Number.POSITIVE_INFINITY, pos), 1);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const $center = drawFs.dot(g, pos.p, 0.1 * scaleFactor, 'gray', delay);
|
|
12
|
+
const $circle = drawFs.dot(g, circle.center, 0.25 * scaleFactor, 'gray', delay);
|
|
13
|
+
const $pos = drawFs.circle(g, circle, 'gray thin10 nofill', delay);
|
|
14
14
|
return [...$center, ...$circle, ...$pos];
|
|
15
15
|
}
|
|
16
16
|
export { drawOneProng };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/one-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAiB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc;AACd,MAAM,WAAW,GAAG,GAAG,CAAC;AAGxB,cAAc;AACd,SAAS,YAAY,CAAC,CAAc,EAAE,GAAkB,EAAE,OAAe,EAAE,KAAK,GAAG,CAAC;IAChF,
|
|
1
|
+
{"version":3,"file":"one-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/one-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAiB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc;AACd,MAAM,WAAW,GAAG,GAAG,CAAC;AAGxB,cAAc;AACd,SAAS,YAAY,CAAC,CAAc,EAAE,GAAkB,EAAE,OAAe,EAAE,KAAK,GAAG,CAAC;IAChF,MAAM,MAAM,GAAG,WAAW;IACtB,kEAAkE;IAClE,mBAAmB,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAClD,CAAC,CACJ,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,GAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,GAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9E,MAAM,IAAI,GAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAEzE,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AAC1C,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -2,8 +2,8 @@ import { drawFs } from 'flo-draw';
|
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function sharpCorner(g, curve) {
|
|
4
4
|
const scaleFactor = 1;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const p = curve.ps[curve.ps.length - 1];
|
|
6
|
+
const $pos = drawFs.dot(g, p, 0.6 * scaleFactor, 'green');
|
|
7
7
|
return $pos;
|
|
8
8
|
}
|
|
9
9
|
export { sharpCorner };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharp-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/sharp-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,WAAW,CAAC,CAAc,EAAE,KAAY;IAChD,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,
|
|
1
|
+
{"version":3,"file":"sharp-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/sharp-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,WAAW,CAAC,CAAc,EAAE,KAAY;IAChD,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,GAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAExD,OAAO,IAAI,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -4,13 +4,13 @@ import { scaleCircle } from '../../../circle.js';
|
|
|
4
4
|
const scaleFactor = 0.3;
|
|
5
5
|
/** @hidden */
|
|
6
6
|
function threeProng(g, threeProng) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const circle = scaleCircle(threeProng.circle, 1);
|
|
8
|
+
const poss = threeProng.poss;
|
|
9
|
+
const $cp1 = drawFs.dot(g, poss[0].p, 0.1 * 1 * scaleFactor, 'blue');
|
|
10
|
+
const $cp2 = drawFs.dot(g, poss[1].p, 0.1 * 2 * scaleFactor, 'blue');
|
|
11
|
+
const $cp3 = drawFs.dot(g, poss[2].p, 0.1 * 3 * scaleFactor, 'blue');
|
|
12
|
+
const $center = drawFs.dot(g, circle.center, 0.3 * scaleFactor, 'blue');
|
|
13
|
+
const $circle = drawFs.circle(g, circle, 'blue thin2 nofill');
|
|
14
14
|
return [...$center, ...$cp1, ...$cp2, ...$cp3, ...$circle];
|
|
15
15
|
}
|
|
16
16
|
export { threeProng };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"three-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/three-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc;AACd,MAAM,WAAW,GAAG,GAAG,CAAC;AAGxB,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,UAAkC;IACrE,
|
|
1
|
+
{"version":3,"file":"three-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/three-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc;AACd,MAAM,WAAW,GAAG,GAAG,CAAC;AAGxB,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,UAAkC;IACrE,MAAM,MAAM,GAAG,WAAW,CACzB,UAAU,CAAC,MAAM,EACjB,CAAC,CACD,CAAC;IACF,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAE7B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,GAAC,CAAC,GAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,GAAC,CAAC,GAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,GAAC,CAAC,GAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,GAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAE9D,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC;AAC5D,CAAC;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tight-bounding-box.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/tight-bounding-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,gBAAgB,CAAC,CAAc,EAAE,GAAe;IACxD,
|
|
1
|
+
{"version":3,"file":"tight-bounding-box.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/tight-bounding-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,gBAAgB,CAAC,CAAc,EAAE,GAAe;IACxD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,CAAC,CAAC;IAE3D,OAAO,IAAI,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { drawFs } from 'flo-draw';
|
|
|
2
2
|
import { getTwoProngType } from '../../../mat/get-two-prong-type.js';
|
|
3
3
|
/** @hidden */
|
|
4
4
|
function twoProng(g, twoProng) {
|
|
5
|
-
|
|
5
|
+
const scaleFactor = 0.3;
|
|
6
6
|
let $failedDot = [];
|
|
7
7
|
let $center = [];
|
|
8
8
|
let $circle = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/two-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,cAAc;AACd,SAAS,QAAQ,CAAC,CAAc,EAAE,QAA8B;IAC/D,
|
|
1
|
+
{"version":3,"file":"two-prong.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/two-prong.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,cAAc;AACd,SAAS,QAAQ,CAAC,CAAc,EAAE,QAA8B;IAC/D,MAAM,WAAW,GAAG,GAAG,CAAC;IAExB,IAAI,UAAU,GAAkB,EAAE,CAAC;IACnC,IAAI,OAAO,GAAqB,EAAE,CAAC;IACnC,IAAI,OAAO,GAAqB,EAAE,CAAC;IACnC,IAAI,IAAI,GAAwB,EAAE,CAAC;IACnC,IAAI,IAAI,GAAwB,EAAE,CAAC;IAEnC,IAAI,KAAK,CAAC;IACV,IAAI,IAAI,CAAC;IAET,QAAQ,eAAe,CAAC,QAAQ,CAAC,EAAE;QAClC,KAAK,kBAAkB,CAAC,CAAC;YACxB,KAAK,GAAG,MAAM,CAAC;YACf,IAAI,GAAG,GAAG,CAAC;YACX,MAAM;SACN;QACD,KAAK,sBAAsB,CAAC,CAAC;YAC5B,KAAK,GAAG,OAAO,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC;YACZ,MAAM;SACN;KACD;IAGD,IAAI,QAAQ,CAAC,MAAM,EAAE;QACpB,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAC,WAAW,EAAE,OAAO,CAAC,CAAC;KACnE;SAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QAC5B,OAAO,GAAG,MAAM,CAAC,GAAG,CAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC5E,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;QAC/E,IAAI,GAAM,MAAM,CAAC,GAAG,CAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACrE,IAAI,GAAM,MAAM,CAAC,GAAG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAC,WAAW,EAAE,KAAK,CAAC,CAAC;KAChE;IAED,OAAO,CAAC,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAClE,CAAC;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { drawFs } from 'flo-draw';
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function vertex(g, cpNode, classes, delay, visible = true) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const visibleClass = visible ? '' : ' invisible';
|
|
5
|
+
const circle = cpNode.cp.circle;
|
|
6
6
|
const THIN = 'thin20';
|
|
7
|
-
|
|
7
|
+
const cps = cpNode.getCpNodesOnCircle();
|
|
8
8
|
console.log(cps);
|
|
9
9
|
let $svgs = [];
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const $circle = drawFs.circle(g, circle, 'red ' + THIN + ' nofill ' + visibleClass, delay);
|
|
11
|
+
const $crossHair = drawFs.crossHair(g, circle.center, 'red ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
12
12
|
$svgs = [...$circle, ...$crossHair];
|
|
13
13
|
for (let i = 0; i < cps.length; i++) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const cp = cps[i];
|
|
15
|
+
const edgeCircle = cp.next.cp.circle;
|
|
16
|
+
const $circle = drawFs.circle(g, edgeCircle, 'pink ' + THIN + ' nofill ' + visibleClass, delay);
|
|
17
|
+
const $crossHair = drawFs.crossHair(g, edgeCircle.center, 'pink ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
18
18
|
$svgs.push(...$circle, ...$crossHair);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const p1 = circle.center;
|
|
20
|
+
const p2 = edgeCircle.center;
|
|
21
|
+
const thin = i === 0 ? 'thin10' : (i === 1 ? 'thin20' : 'thin35');
|
|
22
|
+
const $line = drawFs.line(g, [p1, p2], 'yellow ' + thin + ' nofill ' + visibleClass, delay);
|
|
23
23
|
$svgs.push(...$line);
|
|
24
24
|
}
|
|
25
25
|
return $svgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertex.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/vertex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"vertex.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/vertex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAA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C,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,UAAU,GAAG,YAAY,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAEhH,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAA;QAErC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;QACzB,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;QAC7B,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAClE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,GAAI,UAAU,GAAG,YAAY,EAAE,KAAK,CAAC,CAAC;QAE7F,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;KACrB;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -38,7 +38,7 @@ declare function pointsToStr(ps: number[][], decimalPlaces?: number): string[];
|
|
|
38
38
|
*/
|
|
39
39
|
declare function pointToStr(p: number[], decimalPlaces?: number): string;
|
|
40
40
|
/** @hidden */
|
|
41
|
-
declare
|
|
41
|
+
declare const generalDebugFunctions: {
|
|
42
42
|
δToString: typeof δToString;
|
|
43
43
|
δsToString: typeof δsToString;
|
|
44
44
|
pointToStr: typeof pointToStr;
|
|
@@ -42,7 +42,7 @@ function pointToStr(p, decimalPlaces = 3) {
|
|
|
42
42
|
return p[0].toFixed(decimalPlaces) + ', ' + p[1].toFixed(decimalPlaces);
|
|
43
43
|
}
|
|
44
44
|
/** @hidden */
|
|
45
|
-
|
|
45
|
+
const generalDebugFunctions /*: IGeneralDebugFunctions*/ = {
|
|
46
46
|
δToString,
|
|
47
47
|
δsToString,
|
|
48
48
|
pointToStr,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../src/debug/functions/general.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAa3D,cAAc;AACd,IAAI,CAAC,GAAG,CAAC,CAAC;AACV;;;GAGG;AACH,SAAS,OAAO,CAAC,CAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../src/debug/functions/general.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAa3D,cAAc;AACd,IAAI,CAAC,GAAG,CAAC,CAAC;AACV;;;GAGG;AACH,SAAS,OAAO,CAAC,CAAM,EAAE,GAAG,GAAG,EAAE;IAChC,CAAC,CAAC,IAAI,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC;AACzB,CAAC;AAGD;;;;GAIG;AACH,SAAS,SAAS,CAAC,OAAiB;IACnC,OAAO,OAAO,CAAC,GAAG,CACjB,MAAM,CAAC,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAClD,CAAC;AACH,CAAC;AAGD;;;;GAIG;AACH,SAAS,UAAU,CAAC,OAAmB;IACtC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAGD;;;;GAIG;AACH,SAAS,WAAW,CAAC,EAAc,EAAE,aAAa,GAAG,CAAC;IACrD,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;AAClD,CAAC;AAGD;;;;;GAKG;AACH,SAAS,UAAU,CAAC,CAAW,EAAE,aAAa,GAAG,CAAC;IACjD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AACzE,CAAC;AAGD,cAAc;AACd,MAAM,qBAAqB,CAAA,4BAA4B,GAAG;IACzD,SAAS;IACT,UAAU;IACV,UAAU;IACV,WAAW;IACX,OAAO;CACP,CAAA;AAGD,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -7,5 +7,5 @@ export interface IThreeProngDebugFunctions {
|
|
|
7
7
|
logNearest: (showSpokes?: boolean, showTrace?: boolean, showBoundaries?: boolean) => (g: SVGGElement, p: number[], showDelay?: number) => void;
|
|
8
8
|
}
|
|
9
9
|
/** @hidden */
|
|
10
|
-
declare
|
|
10
|
+
declare const threeProngDebugFunctions: IThreeProngDebugFunctions;
|
|
11
11
|
export { threeProngDebugFunctions };
|
|
@@ -6,10 +6,10 @@ import { equal, getObjClosestTo } from 'flo-vector2d';
|
|
|
6
6
|
* @param n - The 3-prong's zero-based index.
|
|
7
7
|
*/
|
|
8
8
|
function drawSpokes(g, n) {
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const threeProng = _debug_.generated.elems.threeProng[n];
|
|
10
|
+
//const g = threeProng.generated.g;
|
|
11
|
+
const cc = threeProng.circle.center;
|
|
12
|
+
const poss = threeProng.poss;
|
|
13
13
|
//_debug_.fs.draw.line(g, [poss[0].p, cc], 'thin5 red');
|
|
14
14
|
//_debug_.fs.draw.line(g, [poss[1].p, cc], 'thin5 red');
|
|
15
15
|
//_debug_.fs.draw.line(g, [poss[2].p, cc], 'thin5 red');
|
|
@@ -36,10 +36,10 @@ function traceConvergence(g, n_, idx) {
|
|
|
36
36
|
eIndx = n_ + 1;
|
|
37
37
|
}
|
|
38
38
|
for (let n = sIndx; n < eIndx; n++) {
|
|
39
|
-
|
|
40
|
-
//
|
|
39
|
+
const forDebugging = _debug_.generated.elems.threeProng[n];
|
|
40
|
+
//const g = forDebugging.generated.g;
|
|
41
41
|
console.log(forDebugging);
|
|
42
|
-
|
|
42
|
+
const candidateThreeProngs = forDebugging.candidateThreeProngs;
|
|
43
43
|
//-----------------------------
|
|
44
44
|
//---- Get start and end index
|
|
45
45
|
//-----------------------------
|
|
@@ -63,7 +63,7 @@ function traceConvergence(g, n_, idx) {
|
|
|
63
63
|
//---- Draw candidate three-prongs
|
|
64
64
|
//---------------------------------
|
|
65
65
|
for (let i = startIndx; i < endIndx; i++) {
|
|
66
|
-
|
|
66
|
+
const circle = candidateThreeProngs[i].circle;
|
|
67
67
|
if (forDebugging.bestIndx === i) {
|
|
68
68
|
drawFs.dot(g, circle.center, 0.2, 'green');
|
|
69
69
|
drawFs.circle(g, circle, 'black thin10 nofill');
|
|
@@ -83,13 +83,13 @@ function traceConvergence(g, n_, idx) {
|
|
|
83
83
|
* show all.
|
|
84
84
|
*/
|
|
85
85
|
function showBoundary(g, n, idx) {
|
|
86
|
-
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
const debugInfo = _debug_.generated.elems.threeProng[n];
|
|
87
|
+
//const g = debugInfo.generated.g;
|
|
88
|
+
const candidateThreeProngs = debugInfo.candidateThreeProngs;
|
|
89
|
+
const startIndx = idx === undefined ? 0 : idx;
|
|
90
|
+
const endIndx = idx === undefined ? candidateThreeProngs.length : idx;
|
|
91
91
|
// Draw relevant δs
|
|
92
|
-
|
|
92
|
+
const cpss = debugInfo.cpss;
|
|
93
93
|
let j = 0;
|
|
94
94
|
// For each iteration of δ3s (indexed by j)
|
|
95
95
|
for (let idx = 1; idx < cpss.length - 1; idx++) {
|
|
@@ -97,21 +97,21 @@ function showBoundary(g, n, idx) {
|
|
|
97
97
|
j++;
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
const δ3s = [
|
|
101
101
|
cpss[0],
|
|
102
102
|
cpss[idx],
|
|
103
103
|
cpss[cpss.length - 1]
|
|
104
104
|
];
|
|
105
105
|
// For each of the 3 δs
|
|
106
106
|
for (let i = 0; i < 3; i++) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
const δ = δ3s[i];
|
|
108
|
+
const δS = δ[0]; // Delta Start
|
|
109
|
+
const δE = δ[1]; // Delta End
|
|
110
|
+
const posS = δS.cp.pointOnShape;
|
|
111
|
+
const posE = δE.cp.pointOnShape;
|
|
112
|
+
const pS = posS.p;
|
|
113
|
+
const pE = posE.p;
|
|
114
|
+
const r = 1 + (i * 0.5);
|
|
115
115
|
if (equal(pS, pE)) {
|
|
116
116
|
drawFs.crossHair(g, pS, 'red thin10 nofill', r);
|
|
117
117
|
}
|
|
@@ -128,7 +128,7 @@ function showBoundary(g, n, idx) {
|
|
|
128
128
|
* @param n The 3-prong's zero-based index.
|
|
129
129
|
*/
|
|
130
130
|
function logδs(n) {
|
|
131
|
-
|
|
131
|
+
const threeProng = _debug_.generated.elems.threeProng[n];
|
|
132
132
|
console.log(threeProng.cpss);
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
@@ -137,16 +137,16 @@ function logδs(n) {
|
|
|
137
137
|
*/
|
|
138
138
|
function logNearest(showSpokes = true, showTrace = true, showBoundaries = true) {
|
|
139
139
|
return function (g, p, showDelay = 1000) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
//
|
|
140
|
+
const generated = _debug_.generated;
|
|
141
|
+
const threeProng = getObjClosestTo(p, generated.elems.threeProng, threeProng => threeProng.circle ? threeProng.circle.center : [0, 0]);
|
|
142
|
+
const circle = threeProng.circle;
|
|
143
|
+
//const g = threeProng.generated.g;
|
|
144
144
|
console.log(threeProng);
|
|
145
|
-
|
|
145
|
+
const circle2 = {
|
|
146
146
|
center: circle.center,
|
|
147
147
|
radius: circle.radius || 1
|
|
148
148
|
};
|
|
149
|
-
//
|
|
149
|
+
//const draw = _debug_.fs.draw;
|
|
150
150
|
drawFs.circle(g, circle2, 'blue thin10 nofill', showDelay);
|
|
151
151
|
drawFs.crossHair(g, circle.center, 'red thin2 nofill', 2, showDelay);
|
|
152
152
|
if (showSpokes) {
|
|
@@ -155,26 +155,26 @@ function logNearest(showSpokes = true, showTrace = true, showBoundaries = true)
|
|
|
155
155
|
drawFs.line(g, [threeProng.poss[2].p, circle.center], 'blue thin5 nofill', showDelay);
|
|
156
156
|
}
|
|
157
157
|
if (showBoundaries) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
const boundaries = threeProng.boundaries;
|
|
159
|
+
const boundaryS = boundaries[0];
|
|
160
|
+
const boundaryE = boundaries[boundaries.length - 1];
|
|
161
161
|
drawFs.beziers(g, boundaryS, 'red thin20 nofill', showDelay);
|
|
162
162
|
for (let i = 1; i < boundaries.length - 1; i++) {
|
|
163
|
-
|
|
163
|
+
const boundary = boundaries[i];
|
|
164
164
|
drawFs.beziers(g, boundary, 'green thin20 nofill', showDelay);
|
|
165
165
|
}
|
|
166
166
|
drawFs.beziers(g, boundaryE, 'blue thin20 nofill', showDelay);
|
|
167
167
|
}
|
|
168
168
|
if (showTrace) {
|
|
169
|
-
|
|
170
|
-
for (
|
|
169
|
+
const traces = threeProng.traces;
|
|
170
|
+
for (const trace of traces) {
|
|
171
171
|
drawFs.polyline(g, trace, 'red thin5 nofill', showDelay);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
/** @hidden */
|
|
177
|
-
|
|
177
|
+
const threeProngDebugFunctions = {
|
|
178
178
|
drawSpokes,
|
|
179
179
|
traceConvergence,
|
|
180
180
|
showBoundary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"three-prong.js","sourceRoot":"","sources":["../../../src/debug/functions/three-prong.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,E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GElement, n: number, finalOnly?: boolean, showDelay?: number, range?: number[], type?: ElemType_TwoProng) => void;
|
|
10
10
|
}
|
|
11
11
|
/** @hidden */
|
|
12
|
-
declare
|
|
12
|
+
declare const twoProngDebugFunctions: ITwoProngDebugFunctions;
|
|
13
13
|
export { ITwoProngDebugFunctions, twoProngDebugFunctions };
|
|
@@ -4,28 +4,28 @@ import { getObjClosestTo, distanceBetween, squaredDistanceBetween } from 'flo-ve
|
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
6
|
function logδ(n, type = 'twoProng_regular') {
|
|
7
|
-
|
|
7
|
+
const δ = _debug_.generated.elems[type][n].δ;
|
|
8
8
|
console.log(δ);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
13
13
|
function log(n, type = 'twoProng_regular') {
|
|
14
|
-
|
|
14
|
+
const twoProng = _debug_.generated.elems[type][n];
|
|
15
15
|
console.log(twoProng);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @hidden
|
|
19
19
|
*/
|
|
20
20
|
function drawNormal(g, n, showDelay = 1000, type = 'twoProng_regular') {
|
|
21
|
-
|
|
21
|
+
const twoProngs = _debug_.generated.elems[type];
|
|
22
22
|
// If not specified which, draw all
|
|
23
23
|
if (n === undefined) {
|
|
24
24
|
for (let i = 0; i < twoProngs.length; i++) {
|
|
25
25
|
drawNormal(g, i);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const twoProng = twoProngs[n];
|
|
29
29
|
//let g = twoProng.generated.g;
|
|
30
30
|
if (!twoProng) {
|
|
31
31
|
return;
|
|
@@ -36,9 +36,9 @@ function drawNormal(g, n, showDelay = 1000, type = 'twoProng_regular') {
|
|
|
36
36
|
* @hidden
|
|
37
37
|
*/
|
|
38
38
|
function logδBasic(n, type = 'twoProng_regular') {
|
|
39
|
-
|
|
39
|
+
const delta = _debug_.generated.elems[type][n].δ;
|
|
40
40
|
function f(x) {
|
|
41
|
-
|
|
41
|
+
const pos = x.cp.pointOnShape;
|
|
42
42
|
return {
|
|
43
43
|
bez: pos.curve.ps,
|
|
44
44
|
t: pos.t
|
|
@@ -51,14 +51,14 @@ function logδBasic(n, type = 'twoProng_regular') {
|
|
|
51
51
|
* @hidden
|
|
52
52
|
*/
|
|
53
53
|
function logNearest(g, p, showDelay = 1000, type = 'twoProng_regular') {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const closestPerLoops = [];
|
|
55
|
+
const generated = _debug_.generated;
|
|
56
|
+
const twoProng = getObjClosestTo(p, generated.elems[type], twoProng => twoProng.circle.center);
|
|
57
57
|
closestPerLoops.push(twoProng);
|
|
58
58
|
console.log(twoProng);
|
|
59
59
|
let n;
|
|
60
60
|
for (let i = 0; i < _debug_.generated.elems[type].length; i++) {
|
|
61
|
-
|
|
61
|
+
const twoProng_ = _debug_.generated.elems[type][i];
|
|
62
62
|
if (twoProng_ === twoProng) {
|
|
63
63
|
n = i;
|
|
64
64
|
break;
|
|
@@ -77,8 +77,8 @@ function traceConvergence(g, n, finalOnly, showDelay = 1000, range = undefined,
|
|
|
77
77
|
if (n === undefined) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
const twoProngInfo = _debug_.generated.elems[type][n];
|
|
81
|
+
const xs = twoProngInfo.xs;
|
|
82
82
|
//let g = twoProngInfo.generated.g;
|
|
83
83
|
console.log(twoProngInfo);
|
|
84
84
|
console.log(twoProngInfo.xs.map(x => ({
|
|
@@ -95,8 +95,8 @@ function traceConvergence(g, n, finalOnly, showDelay = 1000, range = undefined,
|
|
|
95
95
|
if (finalOnly && i !== xs.length - 1) {
|
|
96
96
|
continue;
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const x = twoProngInfo.xs[i];
|
|
99
|
+
const circle = { center: x.x, radius: distanceBetween(x.x, x.y.p) };
|
|
100
100
|
drawFs.crossHair(g, x.x, 'red thin10 nofill', undefined, showDelay);
|
|
101
101
|
drawFs.circle(g, circle, 'blue thin10 nofill', showDelay);
|
|
102
102
|
if (x.z !== undefined) {
|
|
@@ -106,7 +106,7 @@ function traceConvergence(g, n, finalOnly, showDelay = 1000, range = undefined,
|
|
|
106
106
|
twoProngDebugFunctions.drawNormal(g, n, showDelay);
|
|
107
107
|
}
|
|
108
108
|
/** @hidden */
|
|
109
|
-
|
|
109
|
+
const twoProngDebugFunctions = {
|
|
110
110
|
logδ,
|
|
111
111
|
log,
|
|
112
112
|
drawNormal,
|