A lot of these values are above 1, and a lot are below 0. Since the domain that gets passed to the scaleLinear() function is [0, 1], do a lot of the randomly generated values ultimately get discarded?
No point gets discarded; in fact here the linear scale is not bounded (we could have written it as domain [-1, 1] range[-100, 100] and it would give the same result).
The behavior is clearly not as it should be : since < delaunay.find > identifies the data point closest to the mouse's pointer, then, it would make way more sense if the zoom was done on that nearest point and not on the mouse's pointer which can be way far off depending on data point distribution !!! Looking forward to seeing a common sense behavior correction to this demo code ;-). Warm greetings from France.
First of all, thank you very much for the lighting fast reply even-though it is not satisfying. These links are irrelevant to <delaunay.find >. If you accept to take up the challenge to try to make what I have pointed out to work with <delaunay.find>, you will find out that it is hard to achieve it which is probably why you have preferred a questionable demo with zoom centered on the mouse's pointer. Let's be concrete for readers : Let's say that one wants to edit a nearest point far off from the mouse pointer because of a particular point distribution... centered zoom on the mouse's pointer will make you rethink what makes sense or not. Anyhow, as a matter of fact and common sense, this demo does not cope with the title "FIND AND ZOOM". Simply put : You find "something" and then you center zoom on "something else"... brilliant.