top | item 27224094

Show HN: Tool that turns your images into plotter-like line drawings

405 points| javierbyte | 4 years ago |javier.xyz

74 comments

order
[+] bitwise-evan|4 years ago|reply
Nice! I did something like this a long time ago: http://theartbot.com I wrote a couple algorithms but the best one basically treated the darkness of the image like the altitude in a map, then drew contour lines. I also physically built the plotter.
[+] elliotf|4 years ago|reply
That's really neat! Is the source of the path generator available anywhere?
[+] vanderZwan|4 years ago|reply
Oh that is a beautifully simple trick, I love it!
[+] NelsonMinar|4 years ago|reply
There's a fun and vibrant plotter art community clustered around the AxiDraw and similar low cost at-home plotters. Lots of fun stuff, including several image converters like this.

Just yesterday I was playing with the Flow Imager plugin for VPype. Similar trick of using line density, but in this case it's using a randomized curved flowfield for texture. The fun thing is the experimental "flow along image edges" feature where you get some lines tracing edges in the original picture. https://github.com/serycjon/vpype-flow-imager

[+] jvanderbot|4 years ago|reply
Just a warning. If you upload your own headshot in the standard light-on-light linkedin background style. You will come out looking like a horror film drawing. There isn't enough contrast so it makes your face very dark and jagged.

I love it.

[+] libertine|4 years ago|reply
But I thought of that as a feature: it's great to make cursed images!
[+] ev1|4 years ago|reply
For anyone on Brave or Firefox with protection enabled: you have to turn it off, because canvas randomisation will just result it in it permanently drawing a mess of lines covering the entire square forever.
[+] jimmaswell|4 years ago|reply
Why does this feature exist?
[+] sodality2|4 years ago|reply
I thought it was just taking a while lol
[+] roland35|4 years ago|reply
This is great! I just created a pen holding adapter for my 3d printer so I can do some plots. I still need to find a good way to efficiently convert SVG files to gcode, but this will be a good start.

Inkscape has a gcode generation tool, but it requires some tweaks to work on my prusa 3d printer. Still a work in progress!

[+] londons_explore|4 years ago|reply
It's just a list of X, Y coordinates...

An untested python one-liner:

    '\n'.join(["G0 X"+x+" Y"+y for x,y in coords])
Grab the code for homing and stuff from the start of another gcode file that works.
[+] dukeofdoom|4 years ago|reply
I used to do kind of the opposite art/bored in class thing. Doodle a bunch of random loops and lines. Then see if I could see a graphic of something in there. Sort of my own rorschach test. Then try to bring out that image by going over those lines. I can't be the only one to do this.
[+] uxamanda|4 years ago|reply
There are at least 2 of us :-)
[+] blhack|4 years ago|reply
WOW this is cool! Going to take these files and put them into my lasercutter to see what I get. Really really cool thing!
[+] javierbyte|4 years ago|reply
Author here, that sounds soo cool! If you decide to try please let me know if you need any support!
[+] petercooper|4 years ago|reply
Along similar lines, does anyone know of any good way to turn images into 'hedcut' WSJ style art? I've seen a few attempts but they don't tend to be very good, but it feels like something that's solvable, even if with a GAN or something.
[+] aharris6|4 years ago|reply
Ditherit.com might do a decent rough approximation
[+] ash_dev|4 years ago|reply
cool concept, struggling to get good facial definitions.

https://a.tmp.ninja/obxwcfzK.png

[+] javierbyte|4 years ago|reply
Also, you can try reducing the "contrast" and "definition" settings. I think in this case the hoodie is taking a lot of the lines, I'll take a look, thanks!
[+] forgotpwd16|4 years ago|reply
Left image looks... interesting. I wonder whether this kind of artwork style has a name.
[+] moehm|4 years ago|reply
Can you try again with "Single Line" on?
[+] jonah|4 years ago|reply
Hijacking this post a bit, but does anyone know of a library or API service to convert SVGs to PLT (AutoCad Plotter format, based on HPGL) files. I need them to feed to a laser engraver.

I found convertio[o], but it doesn't support SVG embedded fonts so the text defaults to Times.

[0] https://convertio.co/svg-plt/

[+] efortis|4 years ago|reply
Inkscape does it. Change the text to paths (Path -> Object to Path)
[+] Aspos|4 years ago|reply
Using mobilenet to detect facial features. Smart! Would suggest to go one step further and remove background before processing the face.
[+] pfd1986|4 years ago|reply
I wonder if the number of lines can be a measure of Kolmogorov complexity for an image...

Neat idea regardless.

[+] chriswarbo|4 years ago|reply
It can certainly be a Minimum Description Length (MDL), which is a more general measure based on an arbitrary language (like "lines on a canvas").

Kolmogorov Complexity is the MDL when the language is Turing-complete; in that case I think the number of lines would be less interesting than the patterns in their arrangement. For example, we can arrange millions of lines in a spiral with very low Kolmogorov Complexity; whilst a handful of "random" lines could have a much higher complexity (since, without a pattern, we have to specify them all individually).

I mentioned it in a sibling, but I've written a very simple Python script which can be used as a test-bed for finding the Kolmogorov complexity of plotter-based images (using turtle graphics) http://chriswarbo.net/projects/turtleview

[+] wodenokoto|4 years ago|reply
I dabbled with making something similar (transparent colored triangles, instead of lines), and had a lot of trouble getting something good.

Are there any text describing theories for doing this, or does everybody just trial and error their way through?