It's really cool that Poisson disc sampling is used to generate the points. Here, best-candidate sampling is used, based on [1]. But have you considered using the possibly faster Bridson's algorithm [2]?
Using Harris corners to analyze the picture is a cool idea too. Good job!
Yes! I remember seeing this random sampling method about a year ago and completely forgot what it's called! Here's the webpage I saw it on, complete with explanation and step-by-step animations: http://bost.ocks.org/mike/algorithms/
Would love a desktop version of this, to be able to edit bigger pictures. Currently, generating laptop desktop backgrounds is very slow on mobile devices. It's also hard to position the points exactly, and the result cannot be zoomed. It's fine for mobile sizes, but a desktop app would make it much more pleasant.
A cubism app could 1) detect edges 2) distort the image in a way that these edges follow splines 3) place things enclosed in edges at a random offset 4) amplify edges.
I agree it's not cubism. Well. Kind of. Calling it Kubism is ok though.
And besides, when art takes itself too seriously, with strict descriptions, it limits itself. I think Braque and Picasso would think that this is neat. So this is great.
The parent has a good point though, this looks nice and is interesting but wouldn't it misses the main tenet of cubism, which was to show multiple facets of objects simultaneously, so taking a face, you might see an eye and nose in profile, and also an eye from the front - it is like a simultaneous view of all sides of an object, not a distorted view of one side.
Btw, this is the original "Kubist" I made with Processing a couple years ago. It uses opencv instead of JSFeat for feature point detection, and Mesh library instead of d3.
I love that you can generate these patterns from images, the gradients are a killer feature!
I've made a tool that also generates Delaunay Triangulation patterns but lacks importing of an image. Check it out as well: http://msurguy.github.io/triangles/
I've used this recently! I also attempted to make a Japanese-language triangulation tool a bit more user friendly, but there are still significant bugs: http://internets.computer/delaunay/
In the demo there's also a second mode called "Cell" that seems reminiscent of sampling via Poisson Disc, which you can read more about in Mike Bostock's excellent "Visualizing Algorithms" post.[0]
Yep, both delaunay ("Triangle") and voronoi ("Cell") uses "best candidate algorithm" to distribute the points by default. It's similiar to poisson disc.
The "Analyze image" uses JSFeat to apply a computer vision algorithm (feature point detection) to add some "interesting" points based on the image.
Then for each polygon, I take its points (center point or vertices or an arbitrary point) and find the corresponding pixel on the image. Then I extract the rgb color, and use that to fill the polygon (as solid color or gradient).
Nice work! A small suggestion: live update the image when I drag a point around. It's annoying to have to click, drag, release, click, drag, release when making small adjustments.
Because we don't need yet another domain to host a .js file or a nifty way of displaying something. HN is polluted with "Look guys, I made a jQuery plugin over the weekend, so instead of linking my Github you can check it here yetanotheruselessdomain.io". I might be bitter though, since whenever I want to register a domain for a genuine product/service it is usually taken with a "Buy this domain" link on it and nothing else. Too many domains are being used for silly purposes while taking them off the market from those that could give them much bigger potential.
Using Harris corners to analyze the picture is a cool idea too. Good job!
[1] http://bl.ocks.org/mbostock/b17e0b2aa8b2d50de465 [2] https://www.jasondavies.com/poisson-disc/