11 ms·
Show HN: Tool that turns your images into plotter-like line drawings
- atum47 5y agoCool concept. I was trying to develop something along those lines. I'd like to feed an image to an algorithm and have it draw it, like this: https://www.youtube.com/watch?v=b8mwFDJgWR0 https://www.youtube.com/watch?v=b8mwFDJgWR0 (but better)
- deleted 5y ago[deleted]
- torh 5y agoImpressive. Very artsy.
- dmje 5y agoLove it, that's ace, thanks for posting!
- ev1 5y agoFor 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.
- breadzeppelin__ 5y agoI run brave and did not experience this issue.
- sodality2 5y agoI thought it was just taking a while lol
- jimmaswell 5y agoWhy does this feature exist?
- ev1 5y agowebgl/canvas is used for abusive fingerprinting for tracking you through different brosers, checking what GPU you use, persistent cookieless re-association
- heliophobicdude 5y agoGreat work! Does anyone have any plotter recommendations?
- gregmac 5y agoIn the commercial space, I think "wide format printers" have totally replaced plotters at this point. They're basically big ink jet printers, though usually a bit more sophisticated (often 6 or more inks, including variants like "matte black" and "photo black" and "gray"). The quality is very impressive, you can literally print posters or frameable photos on it if you have the right paper. "XY plotters" are still around but seem to be very niche (emulating hand writing) or DIY/hobby stuff. I remember being in an engineering office of some sort as a kid, fascinated by watching the multi-pen plotter [1] drawing some kind of technical drawing. It had a pen carousel to change colors, and a little robot gripper to hold it. Finding information on these (from the 2 minutes of searching I did) seems quite hard, so it seems like they probably went out of fashion before the internet was a thing. [1] https://encyclopedia2.thefreedictionary.com/XY+plotter https://encyclopedia2.thefreedictionary.com/XY+plotter
- joshu 5y agothere is a big plotter enthusiast community. i was able to find full documentation for my late 80's plotter online easily enough. plotters are still made today, they're just called "vinyl cutters" and don't have the pen changers anymore. perhaps let the people who actually know the answer to the given question do the writing?
- enlightens 5y agohttps://www.axidraw.com/ https://www.axidraw.com/
- paulgb 5y ago+1 for AxiDraw if you’re not into restoring a vintage machine. I’ve been impressed with the build quality of mine (it’s going on four years with no issues). I’m also a fan of the Saxi driver software. Paired with a Raspberry Pi, it gives you a web-based interface to an AxiDraw so that you don’t have to physically connect your computer to the plotter. https://github.com/nornagon/saxi https://github.com/nornagon/saxi
- Aspos 5y agoUsing mobilenet to detect facial features. Smart! Would suggest to go one step further and remove background before processing the face.
- diehunde 5y agoPretty cool! Too bad most of my photos are in HEIC format and the site won't load them.
- javierbyte 5y agoThanks! Author here, are you testing with the HEIC files from your computers? To me it seems that iOS does not have issues with HEIC but probably it is doing some conversion before.
- diehunde 5y agoThat's right. It was from my computer
- petercooper 5y agoAlong 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.
- daniellarusso 5y agoPretty cool! Nice work, dude.
- ash_dev 5y agocool concept, struggling to get good facial definitions. https://a.tmp.ninja/obxwcfzK.png https://a.tmp.ninja/obxwcfzK.png
- moehm 5y agoCan you try again with "Single Line" on?
- javierbyte 5y agoAlso, 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 5y agoLeft image looks... interesting. I wonder whether this kind of artwork style has a name.
- roland35 5y agoThis 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 5y agoIt'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.
- eyegor 5y agoSvg is typically a lot more complicated than coordinate points... https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Pa...
- lights0123 5y ago(In the context of this post, which is just straight lines)
- paulgb 5y agoIf you can use an editor like Inkscape to flatten the image (by recursively ungrouping until every path is under the top-level <svg> tag), you should have a bunch of paths that share a coordinate space. There are pathological cases like images that use CSS for positioning, but for most cases this will work. Then you can use something like svgpathtools (https://github.com/mathandy/svgpathtools https://github.com/mathandy/svgpathtools) in Python to loop over the paths and get the coordinates. In case it's useful, I have an example svg to gcode converter here: https://github.com/paulgb/penkit/blob/master/penkit/polargraph/gcode.py https://github.com/paulgb/penkit/blob/master/penkit/polargra... It is for driving a polargraph-style plotter, so it includes a coordinate transform that GP does not need to do.
- pfd1986 5y agoI wonder if the number of lines can be a measure of Kolmogorov complexity for an image... Neat idea regardless.
- chriswarbo 5y agoIt 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 http://chriswarbo.net/projects/turtleview
- reputet 5y agoThe drawing process looks similar to the Venom transformation! https://youtu.be/ph26HHK9FZg?t=36 https://youtu.be/ph26HHK9FZg?t=36
- blhack 5y agoWOW this is cool! Going to take these files and put them into my lasercutter to see what I get. Really really cool thing!
- javierbyte 5y agoAuthor here, that sounds soo cool! If you decide to try please let me know if you need any support!
- jvanderbot 5y agoJust 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 5y agoBut I thought of that as a feature: it's great to make cursed images!
- NelsonMinar 5y agoThere'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 https://github.com/serycjon/vpype-flow-imager
- zoom6628 5y agoNice way to generate images as headshots for accounts.
- jonah 5y agoHijacking 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/ https://convertio.co/svg-plt/
- tyingq 5y agoYou would probably have better luck with SVG -> DXF, then open in AutoCad and "plot to file"[1]. https://forums.autodesk.com/t5/image/serverpage/image-id/400380i67B94C432EA26C25/image-dimensions/360x253?v=v2 https://forums.autodesk.com/t5/image/serverpage/image-id/400...
- efortis 5y agoInkscape does it. Change the text to paths (Path -> Object to Path)
- bitwise-evan 5y agoNice! I did something like this a long time ago: http://theartbot.com 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 5y agoThat's really neat! Is the source of the path generator available anywhere?
- vanderZwan 5y agoOh that is a beautifully simple trick, I love it!
- laymonage 5y agoThat's really cool!
- why55 5y agoNeeds more turtles. https://en.m.wikipedia.org/wiki/Turtle_graphics https://en.m.wikipedia.org/wiki/Turtle_graphics
- chriswarbo 5y agoMany years ago I wrote a program to convert images into Python scripts containing "turtle" commands. It's mostly a "cheat" based on "penup" and "GOTO(x, y)", but it can certainly be extended with smarter routing and optimisation algorithms: http://chriswarbo.net/projects/turtleview http://chriswarbo.net/projects/turtleview
- buixuanquy 5y agoYou can check this work, very beautiful https://github.com/ColCarroll/imcmc https://github.com/ColCarroll/imcmc
- clcaev 5y agoLast month there was a lovely PlutoCon talk by Paul Butler on turning a picture into a plot. https://m.youtube.com/watch?v=L2KdOJRR3Vo https://m.youtube.com/watch?v=L2KdOJRR3Vo His notebook is at https://plutocon2021-demos.netlify.app/paulbutler_penplottingwithpluto https://plutocon2021-demos.netlify.app/paulbutler_penplottin...
- dukeofdoom 5y agoI 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 5y agoThere are at least 2 of us :-)
- mattowen_uk 5y ago3.
- marapuru 5y agoNumber 4 reporting in
- spaceprison 5y agoNumber 5 here
- BBC-vs-neolibs 5y agoNumber 6 here
- eurekin 5y agohalf a dozen!
- fabatka 5y agoThat's Numberwang!
- infologics 5y agoI really like reading through a post that can make people think. Also, many thanks for permitting me to comment! <a href="http://infocampus.co.in/angulartwo-training-in-bangalore.html">Angular http://infocampus.co.in/angulartwo-training-in-bangalore.htm... Online training</a> <a href="http://infocampus.co.in/angulartwo-training-in-bangalore.html">Angular http://infocampus.co.in/angulartwo-training-in-bangalore.htm... 9 training in Bangalore</a> <a href="http://infocampus.co.in/angularjs-training-in-bangalore.html">AngularJS http://infocampus.co.in/angularjs-training-in-bangalore.html... Training in Bangalore</a> <a href="http://infocampus.co.in/angularjs-training-in-bangalore.html">AngularJS http://infocampus.co.in/angularjs-training-in-bangalore.html... Online Training</a> <a href="http://infocampus.co.in/react-js-training-in-bangalore">ReactJS http://infocampus.co.in/react-js-training-in-bangalore">Reac... Training in Bangalore</a> <a href="http://infocampus.co.in/react-js-training-in-bangalore">ReactJS http://infocampus.co.in/react-js-training-in-bangalore">Reac... Online Training</a> <a href="http://infocampus.co.in/python-training-in-bangalore.html">Python http://infocampus.co.in/python-training-in-bangalore.html">P... training in Bangalore</a> <a href="http://infocampus.co.in/ui-development-training-in-bangalore.html">UI http://infocampus.co.in/ui-development-training-in-bangalore... Development training in Bangalore</a> <a href="http://infocampus.co.in/ui-development-training-in-bangalore.html">UI http://infocampus.co.in/ui-development-training-in-bangalore... Development Online training </a> <a href="http://infocampus.co.in/web-designing-training-in-bangalore.html">Web http://infocampus.co.in/web-designing-training-in-bangalore.... Designing Online Training</a> <a href="http://infocampus.co.in/web-development-training-in-bangalore.html">Web http://infocampus.co.in/web-development-training-in-bangalor... Development training in Bangalore</a> <a href="http://infocampus.co.in/web-designing-training-in-bangalore.html">Web http://infocampus.co.in/web-designing-training-in-bangalore.... Designing Course in Bangalore</a>
- vladstudio 5y agoHint: generate 2 or 3 images from the same photo with different "Lines" settings, then stack them with "multiply" blend mode and some color overlays. Example: https://cdn.vlad.studio/d376f5d1f3e3142028e2bfb8da134346.png https://cdn.vlad.studio/d376f5d1f3e3142028e2bfb8da134346.png
- jankovicsandras 5y agoCool. Shameless plug: public domain image vectorizer https://github.com/jankovicsandras/imagetracerjs https://github.com/jankovicsandras/imagetracerjs
- wodenokoto 5y agoI 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?
- ourcat 5y agoNice. This reminds me a lot of the 'String Art Generator' https://github.com/halfmonty/StringArtGenerator https://github.com/halfmonty/StringArtGenerator to recreate 'Pin and Thread' art. Also see a ' weaving algorithm' here : https://github.com/i-make-robots/weaving_algorithm https://github.com/i-make-robots/weaving_algorithm
- icemooon 5y agoLove it! That’s really cool