MCPcopy Index your code
hub / github.com/plotly/plotly.js / constructDelaunay

Function constructDelaunay

src/traces/scatter3d/convert.js:77–104  ·  view source on GitHub ↗
(points, color, axis)

Source from the content-addressed store, hash-verified

75};
76
77function constructDelaunay(points, color, axis) {
78 var u = (axis + 1) % 3;
79 var v = (axis + 2) % 3;
80 var filteredPoints = [];
81 var filteredIds = [];
82 var i;
83
84 for (i = 0; i < points.length; ++i) {
85 var p = points[i];
86 if (isNaN(p[u]) || !isFinite(p[u]) || isNaN(p[v]) || !isFinite(p[v])) {
87 continue;
88 }
89 filteredPoints.push([p[u], p[v]]);
90 filteredIds.push(i);
91 }
92 var cells = triangulate(filteredPoints);
93 for (i = 0; i < cells.length; ++i) {
94 var c = cells[i];
95 for (var j = 0; j < c.length; ++j) {
96 c[j] = filteredIds[c[j]];
97 }
98 }
99 return {
100 positions: points,
101 cells: cells,
102 meshColor: color
103 };
104}
105
106function calculateErrorParams(errors) {
107 var capSize = [0.0, 0.0, 0.0];

Callers 1

convert.jsFile · 0.85

Calls 1

triangulateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…