Then I switched from the gaming mouse my sister bought for my birthday to my trackpad, and I could suddenly draw really long lines.
My hypothesis is that my gaming mouse has really high precision, so it was sending tons of mousemove events (or whatever) to Chrome. JS was using the aggregate number of such events, rather than the aggregate distance between them, as a cutoff. Therefore, people with really precise input devices can barely draw a line at all, while people without such devices can use the app just fine.
Also, if you move the mouse faster, you can get longer lines. It’s a very bad and stupid measurement, and I’m surprised Google would actually choose this.
My utterly ordinary "Microsoft Optical Mouse V2.0" draws lines about 1"/100 pixels long when moving at normal speeds. I've been trying to draw Michigan, but utterly unable to get a thumb on the lump.
The spec sheet  describes a resolution of 3000 FPS/800 DPI.
and overview video:
I think you briefly talked about using heading change and distance for encoding your polyline. So if I understand correctly, something like:
[forwardDistance1, angleDelta1, forwardDistance2, angleDelta2, ...]
Then are you using it kinda like a kd-tree (filter everything within a threshold of forwardDistance1, then angleDelta1, then next dimension and so on)? But then how do you handle the initial scaling? What about cumulative error in heading or distance?
Congrats on the amazing work by the way!
which gives a value for how close to polylines are (it normalizes them and does some distance calculations)
the way the vp tree works is you provide a set of data and a metric for distance (in my case, the data was the polylines and the metric was from dollar) and it computes the structure. As long as the metric observes some basic principles (I think it's called triangle inequality) the spatial division will work and you can do a fast search for nearest neighbors.
This was a passion project, they approached me with a set of data -- satellite images, and we discussed different ways of visualizing them, etc.
I'm on Chrome (55.0.2883.95 (64-bit)), though, and I'm getting:
"This experience requires WebGL.
Please try again using a WebGL enabled browser, such as Google Chrome"
I actually disabled hardware acceleration because of a macOS Sierra but that would keep logging me out.
Will try messing with the settings.
Can that be changed?
I mean it's still a pretty stunning software otherwise.
Edit: format change
I am running chromium on linux, and get
Hmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card.
I think I never bothered to install proper graphics drivers..
Chrome Version 55.0.2883.95 (64-bit)
macOS Sierra 10.12.2
putting this in the address bar can give you a lot of info as well "chrome://gpu"
here's a technical write up:
the trick for making it fast is vantage point trees (https://en.wikipedia.org/wiki/Vantage-point_tree) which help with nearest neighbor searching through extremely large data sets.
When drawing a Z the top bar of the Z is consistently ignored (I draw from the top down) and doesn't match anything in the picture, just randomly cuts into whatever is there. Whereas the remaining two strokes line up nicely. I think I don't need to screenshot it as it's quite consistent and you should see this yourself too. I wonder why this is...
another thing to note is that the app progressively loads data in the background so you get better results after the first minute or so once all the data is loaded -- the app launches with only 20% of the overall data.
I want to make sure to be positive, this is a super amazing result for almost all the curves I drew :) Just curious about that one.
they are not as good as when you draw a curve and I think it's just trimming based on general poor matches. I've found if I round the Z or make the angle less extreme I can get better results.
I don't have more questions :) Thanks again for sharing this project - the result is fantastic, really shockingly good :) - goes to show...algorithms ftw :)
Great work BTW