Kdtree
Alexander Rose alexander.rose@weirdbyte.de, 2016
Roman Bolzern roman.bolzern@fhnw.ch, 2013
I4DS http://www.fhnw.ch/i4ds, 2013
MIT License http://www.opensource.org/licenses/mit-license.php
k-d Tree for typed arrays of 3d points (e.g. for Float32Array), in-place provides fast nearest neighbour search
Based on https://github.com/ubilabs/kd-tree-javascript by Ubilabs
Further information (including mathematical properties) http://en.wikipedia.org/wiki/Binary_tree http://en.wikipedia.org/wiki/K-d_tree
points: [x, y, z, x, y, z, x, y, z, ...] metric: function(a, b){ return Math.pow(a[0]-b[0], 2) + Math.pow(a[1]-b[1], 2) + Math.pow(a[2]-b[2], 2); }
points
metric
find nearest points
array of size 3
max amount of nodes to return
maximum distance of point to result nodes
array of point, distance pairs
Generated using TypeDoc
Kdtree
Alexander Rose alexander.rose@weirdbyte.de, 2016
Roman Bolzern roman.bolzern@fhnw.ch, 2013
I4DS http://www.fhnw.ch/i4ds, 2013
MIT License http://www.opensource.org/licenses/mit-license.php
k-d Tree for typed arrays of 3d points (e.g. for Float32Array), in-place provides fast nearest neighbour search
Based on https://github.com/ubilabs/kd-tree-javascript by Ubilabs
Further information (including mathematical properties) http://en.wikipedia.org/wiki/Binary_tree http://en.wikipedia.org/wiki/K-d_tree
points: [x, y, z, x, y, z, x, y, z, ...] metric: function(a, b){ return Math.pow(a[0]-b[0], 2) + Math.pow(a[1]-b[1], 2) + Math.pow(a[2]-b[2], 2); }
points
metric