News for hackers. Stuff that matters.
Re:Show HN: Kubist, a little web app to make cubism-like images by dllu on Monday April 20, 2015 @05:55PM (#9411103)
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!

[1] http://bl.ocks.org/mbostock/b17e0b2aa8b2d50de465 [2] https://www.jasondavies.com/poisson-disc/

Re:Show HN: Kubist, a little web app to make cubism-like images by doomrobo on Monday April 20, 2015 @08:06PM (#9411589)
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/
Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @05:59PM (#9411118)
Cool, I didn't know about Bridson's algorithm. Thanks for the pointers!
Re:Show HN: Kubist, a little web app to make cubism-like images by nbartlomiej on Monday April 20, 2015 @06:44PM (#9411297)
I've made an app for the similar art style: http://polygenapp.com , it has been discussed on HN not long ago: https://news.ycombinator.com/item?id=8966928 . Here's a complete list of tools that I'm using, if anyone's interested: https://medium.com/@polygenapp/frameworks-libraries-and-othe... .
Re:Show HN: Kubist, a little web app to make cubism-like images by e_proxus on Tuesday April 21, 2015 @11:23AM (#9414634)
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.
Re:Show HN: Kubist, a little web app to make cubism-like images by keyle on Monday April 20, 2015 @06:55PM (#9411338)
This is very neat. And on iOS I could see this great to make your lock screen funky, but still personalized.
Re:Show HN: Kubist, a little web app to make cubism-like images by ris on Monday April 20, 2015 @06:37PM (#9411269)
That's... not cubism.
Re:Show HN: Kubist, a little web app to make cubism-like images by 1ris on Monday April 20, 2015 @06:53PM (#9411330)
No, not at all. It's nice, but not cubism. Cubism can, for example, look like this:

https://en.wikipedia.org/wiki/File:Juan_Gris_-_Portrait_of_P...

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.

Re:Show HN: Kubist, a little web app to make cubism-like images by randomsearch on Tuesday April 21, 2015 @03:07AM (#9412631)
Wouldn't a cubist app require a 3D model of the subject, or at least photos taken at multiple angles?
Re:Show HN: Kubist, a little web app to make cubism-like images by bobbles on Monday April 20, 2015 @07:15PM (#9411403)
Another great example of a cubism artist is anatole krasnyanksy

https://www.google.com.au/search?q=anatole+krasnyansky&espv=...

Re:Show HN: Kubist, a little web app to make cubism-like images by keyle on Monday April 20, 2015 @06:53PM (#9411327)
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.

Re:Show HN: Kubist, a little web app to make cubism-like images by malkia on Monday April 20, 2015 @06:54PM (#9411334)
Yup. I don't see any cubes. It must be trianglism then.
Re:Show HN: Kubist, a little web app to make cubism-like images by imaginenore on Tuesday April 21, 2015 @06:05AM (#9413070)
SVGism.
Re:Show HN: Kubist, a little web app to make cubism-like images by BuffaloBagel on Monday April 20, 2015 @07:54PM (#9411544)
No, it's kubism.
Re:Show HN: Kubist, a little web app to make cubism-like images by grey-area on Tuesday April 21, 2015 @02:31AM (#9412557)
Quite.

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.

Re:Show HN: Kubist, a little web app to make cubism-like images by hiphopyo on Monday April 20, 2015 @05:16PM (#9410929)
Looks quite similar to http://close-pixelate.desandro.com/ -- good job!
Re:Show HN: Kubist, a little web app to make cubism-like images by mortenjorck on Monday April 20, 2015 @05:29PM (#9410985)
Insta-Chuck Close versus insta-Picasso.
Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @07:16PM (#9411409)
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.

http://www.metaphorical.net/note/on/kubist (really old website, sorry it's kind of unusable :P)

Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @08:39PM (#9411701)
Btw2: there's a "Download SVG" link on lower right. The SVG file can be imported to Adobe Illustrator, Inkscape, etc.
Re:Show HN: Kubist, a little web app to make cubism-like images by vezzy-fnord on Monday April 20, 2015 @04:12PM (#9410574)
"The guy" being Mao Zedong is a nice touch, I'll grant that.
Re:Show HN: Kubist, a little web app to make cubism-like images by msurguy on Monday April 20, 2015 @08:08PM (#9411598)
Very cool!

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/

Re:Show HN: Kubist, a little web app to make cubism-like images by flashman on Tuesday April 21, 2015 @01:15AM (#9412403)
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/
Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Tuesday April 21, 2015 @02:40AM (#9412579)
Love the lighting effects!
Re:Show HN: Kubist, a little web app to make cubism-like images by mihau on Monday April 20, 2015 @04:24PM (#9410654)
Photos look somewhat more modern after that. It's exactly what I needed. Simple, does one thing right :)
Re:Show HN: Kubist, a little web app to make cubism-like images by d55 on Monday April 20, 2015 @04:28PM (#9410684)
I failed in doing something very similar. Could you explain how you split the image up into triangles?
Re:Show HN: Kubist, a little web app to make cubism-like images by dsp1234 on Monday April 20, 2015 @04:32PM (#9410703)
There is a link at the bottom of the page that links to https://medium.com/@williamngan/kubist-6ed1d8025806 which appears to be an explanation on how it works.
Re:Show HN: Kubist, a little web app to make cubism-like images by lelandbatey on Monday April 20, 2015 @04:43PM (#9410757)
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]

[0] - http://bost.ocks.org/mike/algorithms/

Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @05:31PM (#9410992)
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.

Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @05:27PM (#9410974)
Yes. I use d3.geom.delaunay or d3.geom.voronoi to create the delaunay or voronoi tessellation.

http://bl.ocks.org/mbostock/4341156

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).

Re:Show HN: Kubist, a little web app to make cubism-like images by ComNik on Monday April 20, 2015 @06:09PM (#9411161)
Really really nice. Enjoyed playing around with it. The resulting images are very appealing to me.
Re:Show HN: Kubist, a little web app to make cubism-like images by explosion on Monday April 20, 2015 @07:46PM (#9411506)
I agree, the resulting images are beautiful. For some reason, it's surprisingly mesmerizing to drag the points around and see the colors change.
Re:Show HN: Kubist, a little web app to make cubism-like images by cturhan on Tuesday April 21, 2015 @06:26AM (#9413118)
I searched for a long time to find a online triangulation app but couldn't find. I end up with using a mac app, mesh[1] Thanks

[1] http://dmesh.thedofl.com/

Re:Show HN: Kubist, a little web app to make cubism-like images by RevRal on Monday April 20, 2015 @08:24PM (#9411655)
Re:Show HN: Kubist, a little web app to make cubism-like images by PebblesHD on Tuesday April 21, 2015 @04:30AM (#9412817)
The second one looks almost like the interior of a geode, like a 3D crystal or something similar, cool :)
Re:Show HN: Kubist, a little web app to make cubism-like images by dmnd on Monday April 20, 2015 @08:03PM (#9411578)
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.
Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @08:38PM (#9411693)
Good point. I want to do this as well, but the performance is not good enough yet. To be improved!
Re:Show HN: Kubist, a little web app to make cubism-like images by dmnd on Tuesday April 21, 2015 @01:44AM (#9412450)
If you add a throttle it might be ok even if there's a delay between the move and the re-render.
Re:Show HN: Kubist, a little web app to make cubism-like images by dvh on Tuesday April 21, 2015 @03:01AM (#9412621)
You shoud set min attribute for border input element to 0 so it cannot go to negative numbers, like this: <input type="number" min="0" ...
Re:Show HN: Kubist, a little web app to make cubism-like images by DannoHung on Monday April 20, 2015 @07:52PM (#9411532)
Nifty. Kinda reminds me of the Waterlogue[1] app.

[1] http://www.waterlogueapp.com/

Re:Show HN: Kubist, a little web app to make cubism-like images by nulltype on Monday April 20, 2015 @06:19PM (#9411196)
Here's a similar thing I made that just generates these sorts of triangles with some diffuse lighting: http://christopherhesse.github.io/delaunay-experiment/
Re:Show HN: Kubist, a little web app to make cubism-like images by CleanCoder on Monday April 20, 2015 @04:33PM (#9410708)
Thank you for not registering a stand-alone domain to host this.
Re:Show HN: Kubist, a little web app to make cubism-like images by Ecco on Monday April 20, 2015 @05:20PM (#9410948)
Why? (genuine question)
Re:Show HN: Kubist, a little web app to make cubism-like images by CleanCoder on Friday April 24, 2015 @11:47AM (#9434112)
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.
Re:Show HN: Kubist, a little web app to make cubism-like images by camillomiller on Monday April 20, 2015 @05:53PM (#9411096)
Cool. Very helpful to create color palettes from a picture.
Re:Show HN: Kubist, a little web app to make cubism-like images by ggchappell on Monday April 20, 2015 @07:54PM (#9411546)
Cute. I take it that the "cell" version is a Voronoi diagram, and the "triangle" version is its dual?
Re:Show HN: Kubist, a little web app to make cubism-like images by metaphorical on Monday April 20, 2015 @08:34PM (#9411681)
Yep! I didn't use the technical names because it sounds technical ;-)
Re:Show HN: Kubist, a little web app to make cubism-like images by carterehsmith on Monday April 20, 2015 @08:05PM (#9411586)
Heh, cute. BTW the source code link is at the bottom left.
Re:Show HN: Kubist, a little web app to make cubism-like images by akilism on Monday April 20, 2015 @05:50PM (#9411074)
nice...

love code art. jenn schiffer has some nice stuff @ http://vart.institute/