@pie-lib/graphing-utils 1.17.0 → 1.18.0

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/esm/index.js ADDED
@@ -0,0 +1,608 @@
1
+ import debug from 'debug';
2
+ import _ from 'lodash';
3
+
4
+ function _defineProperty(obj, key, value) {
5
+ if (key in obj) {
6
+ Object.defineProperty(obj, key, {
7
+ value: value,
8
+ enumerable: true,
9
+ configurable: true,
10
+ writable: true
11
+ });
12
+ } else {
13
+ obj[key] = value;
14
+ }
15
+
16
+ return obj;
17
+ }
18
+
19
+ function getDefaultExportFromCjs (x) {
20
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
21
+ }
22
+
23
+ var pointGeometry;
24
+ var hasRequiredPointGeometry;
25
+
26
+ function requirePointGeometry () {
27
+ if (hasRequiredPointGeometry) return pointGeometry;
28
+ hasRequiredPointGeometry = 1;
29
+
30
+ pointGeometry = Point;
31
+
32
+ /**
33
+ * A standalone point geometry with useful accessor, comparison, and
34
+ * modification methods.
35
+ *
36
+ * @class Point
37
+ * @param {Number} x the x-coordinate. this could be longitude or screen
38
+ * pixels, or any other sort of unit.
39
+ * @param {Number} y the y-coordinate. this could be latitude or screen
40
+ * pixels, or any other sort of unit.
41
+ * @example
42
+ * var point = new Point(-77, 38);
43
+ */
44
+ function Point(x, y) {
45
+ this.x = x;
46
+ this.y = y;
47
+ }
48
+
49
+ Point.prototype = {
50
+
51
+ /**
52
+ * Clone this point, returning a new point that can be modified
53
+ * without affecting the old one.
54
+ * @return {Point} the clone
55
+ */
56
+ clone: function() { return new Point(this.x, this.y); },
57
+
58
+ /**
59
+ * Add this point's x & y coordinates to another point,
60
+ * yielding a new point.
61
+ * @param {Point} p the other point
62
+ * @return {Point} output point
63
+ */
64
+ add: function(p) { return this.clone()._add(p); },
65
+
66
+ /**
67
+ * Subtract this point's x & y coordinates to from point,
68
+ * yielding a new point.
69
+ * @param {Point} p the other point
70
+ * @return {Point} output point
71
+ */
72
+ sub: function(p) { return this.clone()._sub(p); },
73
+
74
+ /**
75
+ * Multiply this point's x & y coordinates by point,
76
+ * yielding a new point.
77
+ * @param {Point} p the other point
78
+ * @return {Point} output point
79
+ */
80
+ multByPoint: function(p) { return this.clone()._multByPoint(p); },
81
+
82
+ /**
83
+ * Divide this point's x & y coordinates by point,
84
+ * yielding a new point.
85
+ * @param {Point} p the other point
86
+ * @return {Point} output point
87
+ */
88
+ divByPoint: function(p) { return this.clone()._divByPoint(p); },
89
+
90
+ /**
91
+ * Multiply this point's x & y coordinates by a factor,
92
+ * yielding a new point.
93
+ * @param {Point} k factor
94
+ * @return {Point} output point
95
+ */
96
+ mult: function(k) { return this.clone()._mult(k); },
97
+
98
+ /**
99
+ * Divide this point's x & y coordinates by a factor,
100
+ * yielding a new point.
101
+ * @param {Point} k factor
102
+ * @return {Point} output point
103
+ */
104
+ div: function(k) { return this.clone()._div(k); },
105
+
106
+ /**
107
+ * Rotate this point around the 0, 0 origin by an angle a,
108
+ * given in radians
109
+ * @param {Number} a angle to rotate around, in radians
110
+ * @return {Point} output point
111
+ */
112
+ rotate: function(a) { return this.clone()._rotate(a); },
113
+
114
+ /**
115
+ * Rotate this point around p point by an angle a,
116
+ * given in radians
117
+ * @param {Number} a angle to rotate around, in radians
118
+ * @param {Point} p Point to rotate around
119
+ * @return {Point} output point
120
+ */
121
+ rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },
122
+
123
+ /**
124
+ * Multiply this point by a 4x1 transformation matrix
125
+ * @param {Array<Number>} m transformation matrix
126
+ * @return {Point} output point
127
+ */
128
+ matMult: function(m) { return this.clone()._matMult(m); },
129
+
130
+ /**
131
+ * Calculate this point but as a unit vector from 0, 0, meaning
132
+ * that the distance from the resulting point to the 0, 0
133
+ * coordinate will be equal to 1 and the angle from the resulting
134
+ * point to the 0, 0 coordinate will be the same as before.
135
+ * @return {Point} unit vector point
136
+ */
137
+ unit: function() { return this.clone()._unit(); },
138
+
139
+ /**
140
+ * Compute a perpendicular point, where the new y coordinate
141
+ * is the old x coordinate and the new x coordinate is the old y
142
+ * coordinate multiplied by -1
143
+ * @return {Point} perpendicular point
144
+ */
145
+ perp: function() { return this.clone()._perp(); },
146
+
147
+ /**
148
+ * Return a version of this point with the x & y coordinates
149
+ * rounded to integers.
150
+ * @return {Point} rounded point
151
+ */
152
+ round: function() { return this.clone()._round(); },
153
+
154
+ /**
155
+ * Return the magitude of this point: this is the Euclidean
156
+ * distance from the 0, 0 coordinate to this point's x and y
157
+ * coordinates.
158
+ * @return {Number} magnitude
159
+ */
160
+ mag: function() {
161
+ return Math.sqrt(this.x * this.x + this.y * this.y);
162
+ },
163
+
164
+ /**
165
+ * Judge whether this point is equal to another point, returning
166
+ * true or false.
167
+ * @param {Point} other the other point
168
+ * @return {boolean} whether the points are equal
169
+ */
170
+ equals: function(other) {
171
+ return this.x === other.x &&
172
+ this.y === other.y;
173
+ },
174
+
175
+ /**
176
+ * Calculate the distance from this point to another point
177
+ * @param {Point} p the other point
178
+ * @return {Number} distance
179
+ */
180
+ dist: function(p) {
181
+ return Math.sqrt(this.distSqr(p));
182
+ },
183
+
184
+ /**
185
+ * Calculate the distance from this point to another point,
186
+ * without the square root step. Useful if you're comparing
187
+ * relative distances.
188
+ * @param {Point} p the other point
189
+ * @return {Number} distance
190
+ */
191
+ distSqr: function(p) {
192
+ var dx = p.x - this.x,
193
+ dy = p.y - this.y;
194
+ return dx * dx + dy * dy;
195
+ },
196
+
197
+ /**
198
+ * Get the angle from the 0, 0 coordinate to this point, in radians
199
+ * coordinates.
200
+ * @return {Number} angle
201
+ */
202
+ angle: function() {
203
+ return Math.atan2(this.y, this.x);
204
+ },
205
+
206
+ /**
207
+ * Get the angle from this point to another point, in radians
208
+ * @param {Point} b the other point
209
+ * @return {Number} angle
210
+ */
211
+ angleTo: function(b) {
212
+ return Math.atan2(this.y - b.y, this.x - b.x);
213
+ },
214
+
215
+ /**
216
+ * Get the angle between this point and another point, in radians
217
+ * @param {Point} b the other point
218
+ * @return {Number} angle
219
+ */
220
+ angleWith: function(b) {
221
+ return this.angleWithSep(b.x, b.y);
222
+ },
223
+
224
+ /*
225
+ * Find the angle of the two vectors, solving the formula for
226
+ * the cross product a x b = |a||b|sin(θ) for θ.
227
+ * @param {Number} x the x-coordinate
228
+ * @param {Number} y the y-coordinate
229
+ * @return {Number} the angle in radians
230
+ */
231
+ angleWithSep: function(x, y) {
232
+ return Math.atan2(
233
+ this.x * y - this.y * x,
234
+ this.x * x + this.y * y);
235
+ },
236
+
237
+ _matMult: function(m) {
238
+ var x = m[0] * this.x + m[1] * this.y,
239
+ y = m[2] * this.x + m[3] * this.y;
240
+ this.x = x;
241
+ this.y = y;
242
+ return this;
243
+ },
244
+
245
+ _add: function(p) {
246
+ this.x += p.x;
247
+ this.y += p.y;
248
+ return this;
249
+ },
250
+
251
+ _sub: function(p) {
252
+ this.x -= p.x;
253
+ this.y -= p.y;
254
+ return this;
255
+ },
256
+
257
+ _mult: function(k) {
258
+ this.x *= k;
259
+ this.y *= k;
260
+ return this;
261
+ },
262
+
263
+ _div: function(k) {
264
+ this.x /= k;
265
+ this.y /= k;
266
+ return this;
267
+ },
268
+
269
+ _multByPoint: function(p) {
270
+ this.x *= p.x;
271
+ this.y *= p.y;
272
+ return this;
273
+ },
274
+
275
+ _divByPoint: function(p) {
276
+ this.x /= p.x;
277
+ this.y /= p.y;
278
+ return this;
279
+ },
280
+
281
+ _unit: function() {
282
+ this._div(this.mag());
283
+ return this;
284
+ },
285
+
286
+ _perp: function() {
287
+ var y = this.y;
288
+ this.y = this.x;
289
+ this.x = -y;
290
+ return this;
291
+ },
292
+
293
+ _rotate: function(angle) {
294
+ var cos = Math.cos(angle),
295
+ sin = Math.sin(angle),
296
+ x = cos * this.x - sin * this.y,
297
+ y = sin * this.x + cos * this.y;
298
+ this.x = x;
299
+ this.y = y;
300
+ return this;
301
+ },
302
+
303
+ _rotateAround: function(angle, p) {
304
+ var cos = Math.cos(angle),
305
+ sin = Math.sin(angle),
306
+ x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),
307
+ y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);
308
+ this.x = x;
309
+ this.y = y;
310
+ return this;
311
+ },
312
+
313
+ _round: function() {
314
+ this.x = Math.round(this.x);
315
+ this.y = Math.round(this.y);
316
+ return this;
317
+ }
318
+ };
319
+
320
+ /**
321
+ * Construct a point from an array if necessary, otherwise if the input
322
+ * is already a Point, or an unknown type, return it unchanged
323
+ * @param {Array<Number>|Point|*} a any kind of input value
324
+ * @return {Point} constructed point, or passed-through value.
325
+ * @example
326
+ * // this
327
+ * var point = Point.convert([0, 1]);
328
+ * // is equivalent to
329
+ * var point = new Point(0, 1);
330
+ */
331
+ Point.convert = function (a) {
332
+ if (a instanceof Point) {
333
+ return a;
334
+ }
335
+ if (Array.isArray(a)) {
336
+ return new Point(a[0], a[1]);
337
+ }
338
+ return a;
339
+ };
340
+ return pointGeometry;
341
+ }
342
+
343
+ var pointGeometryExports = requirePointGeometry();
344
+ var Point = /*@__PURE__*/getDefaultExportFromCjs(pointGeometryExports);
345
+
346
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
347
+
348
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
349
+ var log = debug('pie-lib:graphing:tools:utils');
350
+ var FREQ_DIVIDER = 16;
351
+ var getAmplitudeAndFreq = (root, edge) => {
352
+ if (!edge) {
353
+ return {
354
+ freq: 0,
355
+ amplitude: 0
356
+ };
357
+ }
358
+
359
+ if (root.x == edge.x) {
360
+ return {
361
+ freq: 0,
362
+ amplitude: 0
363
+ };
364
+ }
365
+
366
+ var r = new Point(root.x, root.y);
367
+ var e = new Point(edge.x, edge.y);
368
+ var d = e.sub(r); // edge point describes 1/4 of the freq
369
+
370
+ return {
371
+ freq: d.x * 4,
372
+ amplitude: d.y
373
+ };
374
+ };
375
+ /**
376
+ * build the x points with root as the anchor.
377
+ */
378
+
379
+ var xPoints = (root, freq, min, max) => {
380
+ freq = Math.abs(freq);
381
+ log('[xPoints] root:', root, 'freq:', freq, ' min:', min, ' max:', max);
382
+
383
+ var leftpoints = _.rangeRight(root, min - freq, freq * -1);
384
+
385
+ var rightpoints = _.range(root + freq, max + freq, freq);
386
+
387
+ return _.concat(leftpoints, rightpoints);
388
+ };
389
+ /**
390
+ * Calculate y for x value using amp, freq and shift
391
+ * https://www.desmos.com/calculator/f1psfoiiv6
392
+ */
393
+
394
+ var sinY = (amplitude, freq, shift) => x => {
395
+ shift = _objectSpread({
396
+ phase: 0,
397
+ vertical: 0
398
+ }, shift);
399
+ var TWO_PI = Math.PI * 2;
400
+ var num = TWO_PI * (x - shift.phase);
401
+ var frac = num / freq;
402
+ var sin = Math.sin(frac);
403
+ var sinFloat = parseFloat(sin).toFixed(10);
404
+ return amplitude * sinFloat + shift.vertical;
405
+ };
406
+ /**
407
+ * You need three points for the quadratic eq, so we mirror the edge point
408
+ * https://www.desmos.com/calculator/xhz1xqgpca
409
+ */
410
+
411
+ var parabolaFromTwoPoints = (root, edge) => {
412
+ edge = edge || _objectSpread({}, root);
413
+ var mirrorEdge = {
414
+ x: root.x - (edge.x - root.x),
415
+ y: edge.y
416
+ };
417
+ return parabolaFromThreePoints(root, edge, mirrorEdge);
418
+ };
419
+ var parabolaFromThreePoints = (one, two, three) => {
420
+ log(one, two, three);
421
+ var {
422
+ a,
423
+ b,
424
+ c
425
+ } = pointsToABC(one, two, three);
426
+ log(a, b, c);
427
+ return parabola(a, b, c);
428
+ };
429
+ /** derive a,b,c from the 3 points */
430
+
431
+ var pointsToABC = (one, two, three) => {
432
+ var a1 = Math.pow(one.x, 2) * -1 + Math.pow(two.x, 2);
433
+ var b1 = one.x * -1 + two.x;
434
+ var d1 = one.y * -1 + two.y;
435
+ var a2 = Math.pow(two.x, 2) * -1 + Math.pow(three.x, 2);
436
+ var b2 = two.x * -1 + three.x;
437
+ var d2 = two.y * -1 + three.y;
438
+ var bMult = b2 / b1 * -1;
439
+ var a3 = bMult * a1 + a2;
440
+ var d3 = bMult * d1 + d2;
441
+ var a = d3 / a3;
442
+ var b = (d1 - a1 * a) / b1;
443
+ var c = one.y - a * Math.pow(one.x, 2) - b * one.x;
444
+ return {
445
+ a,
446
+ b,
447
+ c
448
+ };
449
+ };
450
+ /**
451
+ * y=ax^2+bx+c
452
+ */
453
+
454
+ var parabola = (a, b, c) => x => a * Math.pow(x, 2) + b * x + c;
455
+ /**
456
+ * Absolute value from two points Root (Vertex) the point where the two rays intersect and edge One point on a ray.
457
+ * @param root 1st point selected on graph
458
+ * @param edge 2nd point selected on graph
459
+ * https://www.desmos.com/calculator/rarxiatpip
460
+ */
461
+
462
+ var absoluteFromTwoPoints = (root, edge) => {
463
+ edge = edge || _objectSpread({}, root);
464
+ var a = pointsToAForAbsolute(root, edge);
465
+ return absolute(a, root.x, root.y);
466
+ };
467
+ /*
468
+ * Finds value of a in y=a*abs(x-h)+k function
469
+ * @param one 1st point
470
+ * @param two 2nd point
471
+ * */
472
+
473
+ var pointsToAForAbsolute = (one, two) => {
474
+ var y1 = two.y - one.y;
475
+ var x1 = two.x - one.x;
476
+ var a = y1 / x1;
477
+
478
+ if (two.x < one.x) {
479
+ a = a * -1;
480
+ }
481
+
482
+ return a;
483
+ };
484
+ /**
485
+ * y=a*abs(x-h)+k
486
+ */
487
+
488
+ var absolute = (a, h, k) => x => a * Math.abs(x - h) + k;
489
+ /**
490
+ * Exponential from two points on exponential graph.
491
+ * @param root 1st point selected on graph
492
+ * @param edge 2nd point selected on graph
493
+ * https://www.desmos.com/calculator/3fisjexbvp
494
+ */
495
+
496
+ var exponentialFromTwoPoints = (root, edge) => {
497
+ edge = edge || _objectSpread({}, root);
498
+ var {
499
+ a,
500
+ b
501
+ } = pointsToABForExponential(root, edge);
502
+ return exponential(a, b);
503
+ };
504
+ /*
505
+ * Finds value of a and b in y=a*(b)^x function
506
+ * @param one 1st point
507
+ * @param two 2nd point
508
+ * */
509
+
510
+ var pointsToABForExponential = (one, two) => {
511
+ var p = one.y / two.y;
512
+ var r = 1 / (one.x - two.x);
513
+ var b = Math.pow(p, r);
514
+ var a = one.y / Math.pow(b, one.x);
515
+ return {
516
+ a,
517
+ b
518
+ };
519
+ };
520
+ /**
521
+ * y=a*(b)^x
522
+ */
523
+
524
+ var exponential = (a, b) => x => a * Math.pow(b, x);
525
+ /**
526
+ * Generate a set of data points, add spacing before min and after max if there is space between minx + min and maxX and max
527
+ * @param {*} domain
528
+ * @param {*} range
529
+ * @param {*} root
530
+ * @param {*} edge
531
+ * @param {*} yFn
532
+ * @param {*} excludeOutsidePoints
533
+ */
534
+
535
+ var buildDataPoints = function buildDataPoints(domain, range, root, edge, yFn) {
536
+ var excludeOutsidePoints = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
537
+ log('[buildDataPoints] domain:', domain, 'range:', range, 'root:', root, 'edge:', edge);
538
+ domain = _objectSpread({
539
+ min: 0,
540
+ max: 0,
541
+ step: 1
542
+ }, domain);
543
+ range = _objectSpread({
544
+ min: 0,
545
+ max: 0,
546
+ step: 1
547
+ }, range);
548
+ edge = edge ? edge : _objectSpread({}, root);
549
+ var minX = Math.min(root.x, edge.x);
550
+ var xPts = xPoints(minX, domain.step, domain.min - domain.step, domain.max + domain.step);
551
+ log('[buildDataPoints]:xPts:', xPts);
552
+ var startIndex = -1;
553
+ var endIndex = -1; // generate points based on the yFn
554
+
555
+ var points = xPts.map(v => new Point(v, yFn(v)));
556
+
557
+ if (!excludeOutsidePoints) {
558
+ return points;
559
+ } // exclude the points with y outside range min and max
560
+
561
+
562
+ var filteredPoints = points.reduce((acc, val, index) => {
563
+ if (val.y >= range.min - range.step && val.y <= range.max + range.step) {
564
+ if (startIndex === -1) {
565
+ startIndex = index;
566
+ }
567
+
568
+ if (endIndex < index) {
569
+ endIndex = index;
570
+ }
571
+
572
+ return [...acc, val];
573
+ }
574
+
575
+ return acc;
576
+ }, []); // add the first value outside range min and max smaller than range.min if exists
577
+
578
+ if (startIndex - 1 >= 0) {
579
+ filteredPoints.unshift(points[startIndex - 1]);
580
+ } // add the first value outside range min and max greater than range.min if exists
581
+
582
+
583
+ if (endIndex + 1 <= points.length - 1) {
584
+ filteredPoints.push(points[endIndex + 1]);
585
+ }
586
+
587
+ return points;
588
+ };
589
+ var index = {
590
+ FREQ_DIVIDER,
591
+ getAmplitudeAndFreq,
592
+ xPoints,
593
+ sinY,
594
+ parabolaFromTwoPoints,
595
+ parabolaFromThreePoints,
596
+ pointsToABC,
597
+ parabola,
598
+ absoluteFromTwoPoints,
599
+ pointsToAForAbsolute,
600
+ absolute,
601
+ exponentialFromTwoPoints,
602
+ pointsToABForExponential,
603
+ exponential,
604
+ buildDataPoints
605
+ };
606
+
607
+ export { FREQ_DIVIDER, absolute, absoluteFromTwoPoints, buildDataPoints, index as default, exponential, exponentialFromTwoPoints, getAmplitudeAndFreq, parabola, parabolaFromThreePoints, parabolaFromTwoPoints, pointsToABC, pointsToABForExponential, pointsToAForAbsolute, sinY, xPoints };
608
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../node_modules/@mapbox/point-geometry/index.js","../src/index.js"],"sourcesContent":["export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array<Number>} m transformation matrix\n * @return {Point} output point\n */\n matMult: function(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function() { return this.clone()._round(); },\n\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n _matMult: function(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _add: function(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n _sub: function(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n _mult: function(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n _div: function(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n _multByPoint: function(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n _divByPoint: function(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit: function() {\n this._div(this.mag());\n return this;\n },\n\n _perp: function() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n _rotate: function(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _rotateAround: function(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round: function() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array<Number>|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};\n","import debug from 'debug';\nimport Point from '@mapbox/point-geometry';\nimport _ from 'lodash';\nconst log = debug('pie-lib:graphing:tools:utils');\n\nexport const FREQ_DIVIDER = 16;\n\nexport const getAmplitudeAndFreq = (root, edge) => {\n if (!edge) {\n return { freq: 0, amplitude: 0 };\n }\n\n if (root.x == edge.x) {\n return { freq: 0, amplitude: 0 };\n }\n\n const r = new Point(root.x, root.y);\n const e = new Point(edge.x, edge.y);\n const d = e.sub(r);\n // edge point describes 1/4 of the freq\n return { freq: d.x * 4, amplitude: d.y };\n};\n\n/**\n * build the x points with root as the anchor.\n */\nexport const xPoints = (root, freq, min, max) => {\n freq = Math.abs(freq);\n log('[xPoints] root:', root, 'freq:', freq, ' min:', min, ' max:', max);\n const leftpoints = _.rangeRight(root, min - freq, freq * -1);\n const rightpoints = _.range(root + freq, max + freq, freq);\n\n return _.concat(leftpoints, rightpoints);\n};\n\n/**\n * Calculate y for x value using amp, freq and shift\n * https://www.desmos.com/calculator/f1psfoiiv6\n */\nexport const sinY = (amplitude, freq, shift) => (x) => {\n shift = { phase: 0, vertical: 0, ...shift };\n const TWO_PI = Math.PI * 2;\n const num = TWO_PI * (x - shift.phase);\n const frac = num / freq;\n const sin = Math.sin(frac);\n const sinFloat = parseFloat(sin).toFixed(10);\n return amplitude * sinFloat + shift.vertical;\n};\n\n/**\n * You need three points for the quadratic eq, so we mirror the edge point\n * https://www.desmos.com/calculator/xhz1xqgpca\n */\nexport const parabolaFromTwoPoints = (root, edge) => {\n edge = edge || { ...root };\n const mirrorEdge = { x: root.x - (edge.x - root.x), y: edge.y };\n return parabolaFromThreePoints(root, edge, mirrorEdge);\n};\n\nexport const parabolaFromThreePoints = (one, two, three) => {\n log(one, two, three);\n const { a, b, c } = pointsToABC(one, two, three);\n log(a, b, c);\n return parabola(a, b, c);\n};\n/** derive a,b,c from the 3 points */\nexport const pointsToABC = (one, two, three) => {\n const a1 = Math.pow(one.x, 2) * -1 + Math.pow(two.x, 2);\n const b1 = one.x * -1 + two.x;\n const d1 = one.y * -1 + two.y;\n const a2 = Math.pow(two.x, 2) * -1 + Math.pow(three.x, 2);\n const b2 = two.x * -1 + three.x;\n const d2 = two.y * -1 + three.y;\n const bMult = (b2 / b1) * -1;\n const a3 = bMult * a1 + a2;\n const d3 = bMult * d1 + d2;\n const a = d3 / a3;\n const b = (d1 - a1 * a) / b1;\n const c = one.y - a * Math.pow(one.x, 2) - b * one.x;\n return { a, b, c };\n};\n\n/**\n * y=ax^2+bx+c\n */\nexport const parabola = (a, b, c) => (x) => a * Math.pow(x, 2) + b * x + c;\n\n/**\n * Absolute value from two points Root (Vertex) the point where the two rays intersect and edge One point on a ray.\n * @param root 1st point selected on graph\n * @param edge 2nd point selected on graph\n * https://www.desmos.com/calculator/rarxiatpip\n */\nexport const absoluteFromTwoPoints = (root, edge) => {\n edge = edge || { ...root };\n const a = pointsToAForAbsolute(root, edge);\n return absolute(a, root.x, root.y);\n};\n\n/*\n * Finds value of a in y=a*abs(x-h)+k function\n * @param one 1st point\n * @param two 2nd point\n * */\nexport const pointsToAForAbsolute = (one, two) => {\n const y1 = two.y - one.y;\n const x1 = two.x - one.x;\n let a = y1 / x1;\n if (two.x < one.x) {\n a = a * -1;\n }\n return a;\n};\n\n/**\n * y=a*abs(x-h)+k\n */\nexport const absolute = (a, h, k) => (x) => a * Math.abs(x - h) + k;\n\n/**\n * Exponential from two points on exponential graph.\n * @param root 1st point selected on graph\n * @param edge 2nd point selected on graph\n * https://www.desmos.com/calculator/3fisjexbvp\n */\nexport const exponentialFromTwoPoints = (root, edge) => {\n edge = edge || { ...root };\n const { a, b } = pointsToABForExponential(root, edge);\n return exponential(a, b);\n};\n\n/*\n * Finds value of a and b in y=a*(b)^x function\n * @param one 1st point\n * @param two 2nd point\n * */\nexport const pointsToABForExponential = (one, two) => {\n const p = one.y / two.y;\n const r = 1 / (one.x - two.x);\n const b = Math.pow(p, r);\n const a = one.y / Math.pow(b, one.x);\n return { a, b };\n};\n\n/**\n * y=a*(b)^x\n */\nexport const exponential = (a, b) => (x) => a * Math.pow(b, x);\n\n/**\n * Generate a set of data points, add spacing before min and after max if there is space between minx + min and maxX and max\n * @param {*} domain\n * @param {*} range\n * @param {*} root\n * @param {*} edge\n * @param {*} yFn\n * @param {*} excludeOutsidePoints\n */\nexport const buildDataPoints = (domain, range, root, edge, yFn, excludeOutsidePoints = false) => {\n log('[buildDataPoints] domain:', domain, 'range:', range, 'root:', root, 'edge:', edge);\n\n domain = { min: 0, max: 0, step: 1, ...domain };\n range = { min: 0, max: 0, step: 1, ...range };\n edge = edge ? edge : { ...root };\n\n const minX = Math.min(root.x, edge.x);\n const xPts = xPoints(minX, domain.step, domain.min - domain.step, domain.max + domain.step);\n\n log('[buildDataPoints]:xPts:', xPts);\n\n let startIndex = -1;\n let endIndex = -1;\n\n // generate points based on the yFn\n const points = xPts.map((v) => new Point(v, yFn(v)));\n\n if (!excludeOutsidePoints) {\n return points;\n }\n\n // exclude the points with y outside range min and max\n const filteredPoints = points.reduce((acc, val, index) => {\n if (val.y >= range.min - range.step && val.y <= range.max + range.step) {\n if (startIndex === -1) {\n startIndex = index;\n }\n\n if (endIndex < index) {\n endIndex = index;\n }\n\n return [...acc, val];\n }\n\n return acc;\n }, []);\n\n // add the first value outside range min and max smaller than range.min if exists\n if (startIndex - 1 >= 0) {\n filteredPoints.unshift(points[startIndex - 1]);\n }\n\n // add the first value outside range min and max greater than range.min if exists\n if (endIndex + 1 <= points.length - 1) {\n filteredPoints.push(points[endIndex + 1]);\n }\n\n return points;\n};\n\nexport default {\n FREQ_DIVIDER,\n getAmplitudeAndFreq,\n xPoints,\n sinY,\n parabolaFromTwoPoints,\n parabolaFromThreePoints,\n pointsToABC,\n parabola,\n absoluteFromTwoPoints,\n pointsToAForAbsolute,\n absolute,\n exponentialFromTwoPoints,\n pointsToABForExponential,\n exponential,\n buildDataPoints,\n};\n"],"names":["log","debug","FREQ_DIVIDER","getAmplitudeAndFreq","root","edge","freq","amplitude","x","r","Point","y","e","d","sub","xPoints","min","max","Math","abs","leftpoints","_","rangeRight","rightpoints","range","concat","sinY","shift","phase","vertical","TWO_PI","PI","num","frac","sin","sinFloat","parseFloat","toFixed","parabolaFromTwoPoints","mirrorEdge","parabolaFromThreePoints","one","two","three","a","b","c","pointsToABC","parabola","a1","pow","b1","d1","a2","b2","d2","bMult","a3","d3","absoluteFromTwoPoints","pointsToAForAbsolute","absolute","y1","x1","h","k","exponentialFromTwoPoints","pointsToABForExponential","exponential","p","buildDataPoints","domain","yFn","excludeOutsidePoints","step","minX","xPts","startIndex","endIndex","points","map","v","filteredPoints","reduce","acc","val","index","unshift","length","push"],"mappings":";;;AAAe,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE;AACzD,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;AAClB,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE;AACpC,MAAM,KAAK,EAAE,KAAK;AAClB,MAAM,UAAU,EAAE,IAAI;AACtB,MAAM,YAAY,EAAE,IAAI;AACxB,MAAM,QAAQ,EAAE;AAChB,KAAK,CAAC;AACN,EAAE,CAAC,MAAM;AACT,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AACpB,EAAE;;AAEF,EAAE,OAAO,GAAG;AACZ;;;;;;;;;;;;;ACXA,CAAA,aAAc,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAA,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE;AACrB,KAAI,IAAI,CAAC,CAAC,GAAG,CAAC;AAC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C,GAAGF,GAAJ,EAASC,GAAT,CAAP;AACD,IAAA;;AAED,IAAA,OAAOD,GAAP;AACD,EAAA,CAdsB,EAcpB,EAdoB,CAAvB,CAvB+F;;AAwC/F,EAAA,IAAIP,UAAU,GAAG,CAAb,IAAkB,CAAtB,EAAyB;AACvBK,IAAAA,cAAc,CAACK,OAAf,CAAuBR,MAAM,CAACF,UAAU,GAAG,CAAd,CAA7B,CAAA;AACD,EAAA,CA1C8F;;;AA6C/F,EAAA,IAAIC,QAAQ,GAAG,CAAX,IAAgBC,MAAM,CAACS,MAAP,GAAgB,CAApC,EAAuC;AACrCN,IAAAA,cAAc,CAACO,IAAf,CAAoBV,MAAM,CAACD,QAAQ,GAAG,CAAZ,CAA1B,CAAA;AACD,EAAA;;AAED,EAAA,OAAOC,MAAP;AACD;AAED,YAAe;AACb7E,EAAAA,YADa;AAEbC,EAAAA,mBAFa;AAGbY,EAAAA,OAHa;AAIbW,EAAAA,IAJa;AAKbY,EAAAA,qBALa;AAMbE,EAAAA,uBANa;AAObO,EAAAA,WAPa;AAQbC,EAAAA,QARa;AASbW,EAAAA,qBATa;AAUbC,EAAAA,oBAVa;AAWbC,EAAAA,QAXa;AAYbK,EAAAA,wBAZa;AAabC,EAAAA,wBAba;AAcbC,EAAAA,WAda;AAebE,EAAAA;AAfa,CAAf;;;;","x_google_ignoreList":[0,1]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-utils",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
@@ -14,6 +14,13 @@
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11"
16
16
  },
17
- "gitHead": "33e213964d9074c1349afab66894c005a607b1d6",
18
- "scripts": {}
17
+ "gitHead": "d6cccc4cca72fde471ababc7dce4c6236f5cbc0a",
18
+ "scripts": {},
19
+ "exports": {
20
+ ".": {
21
+ "import": "./esm/index.js",
22
+ "require": "./lib/index.js",
23
+ "default": "./esm/index.js"
24
+ }
25
+ }
19
26
  }