From tsicons.com
Convert SVG to canvas on-the-fly.
This article from MDN explains the process: Drawing DOM object into a canvas. This works for any DOM object, not just SVG. Not sure if this is well supported by older browsers. Works on Chrome, Firefox and IE 10 for me. The bar chart is a fork of this block by Mike Bostock: Canvas Bar Chart.
k-d tree nearest neighbors search (k-NN). The red dots are the 10 nearest neighbors. Orange dots are scanned and not selected.
Compare with this block that implements a k nearest neighbor search using a quadtree instead of a k-d tree.
The algorithm for this search came from this course handout. Note that the "k" in k-d tree need not be the same number as the "k" in
k-d tree nearest neighbor search (1-NN). The red dot is the nearest neighbor. Orange dots are scanned and not selected.
Compare to nearest neighbor search using quadtrees from this block. The k-d tree technique seems to scan more points, although the process of limiting the search set is different so this isn't really a direct measure of which is more efficient.
| height: 800 |
Decomposing an image's color information. Click an image to see it decomposed.
Alternative design to this block using circle packing instead of treemaps.
Images source: National Gallery of Art's Highlights
| height: 600 |
| height: 1000 |
| height: 600 |


