[HN Gopher] Pen Plotter Programming: The Basics (2017)
___________________________________________________________________
Pen Plotter Programming: The Basics (2017)
Author : Tomte
Score : 86 points
Date : 2024-05-13 06:05 UTC (1 days ago)
(HTM) web link (medium.com)
(TXT) w3m dump (medium.com)
| gilleain wrote:
| Hah, I was not expecting to open up that page to see an image of
| a ribbon diagram of alpha-glucosidase.
|
| Also, links to 'Makeblock XY Plotter' seem to no longer work as
| it has been discontinued? (Don't recommend going to their site -
| it has an obnoxious number of 'sign up' popups, sadly)
| flobosg wrote:
| If you like, you can purchase plotter ribbon diagrams from him:
| https://www.michaelfogleman.com/plotter/
| gilleain wrote:
| Interesting. Looking at those diagrams I'm trying hard not to
| evaluate them with the eye of a protein structure expert
| (which I used to be, not anymore!).
|
| He says "I'm no biologist", which is of course no issue -
| anyone should make whatever images they want, but I wonder if
| the pose and detail that he includes are what looks good to
| him, rather than what is 'most' relevant.
|
| Either way, they do look good like this :)
| flobosg wrote:
| I'm not sure how is he orienting the camera in his library
| (https://github.com/fogleman/ribbon), but the usual
| approach is to maximize what is shown on the X and Y axes
| by e.g. aligning principal components (as PyMOL does).
| gilleain wrote:
| Looking at this function:
|
| https://github.com/fogleman/ribbon/blob/master/ribbon/cam
| era...
|
| it's getting the carbonyls (C and O atoms) and then
| trying to pick a view vector based on maximising some
| scores ... of some kind. Like the aspect ratio and number
| of visible points? Not sure.
| flobosg wrote:
| He's using the alpha carbons (CA) adjacent to the
| carbonyl groups as well as the carbonyl oxygens (O),
| approximating the peptide plane. In addition he
| incorporates heteroatoms, so the scoring function takes
| ligands into account, if present.
| fogleman wrote:
| Definitely didn't expect people on Hacker News to
| scrutinize this code when I wrote it 7 years ago, hah!
|
| Curious to hear how a "protein structure expert" would
| prefer to pose the proteins?
|
| I did sell some of these drawings. Two customers stand
| out in my memory. One wanted drawings as a gift to his
| father who had spent most of his career working with some
| specific protein. The other was someone who had a genetic
| defect in the family and wanted a drawing of the protein
| responsible for it.
| mattdesl wrote:
| Nice intro!
|
| Readers may also appreciate my post "Pen Plotter Art &
| Algorithms" here:
|
| https://mattdesl.svbtle.com/pen-plotter-1
| nfrmatk wrote:
| If you like this you might also like Nick Fitzgerald's 2019
| RustConf talk: Flatulence, Crystals, and Happy Little Accidents.
|
| https://youtu.be/Ho3xr4b60Zg
| beardicus wrote:
| thanks for this link. i guess i totally missed this five years
| ago when it was published... fun talk.
| michael_chip wrote:
| Can really recommend the Silhouette Cameo line of vinyl plotters
| (silhouette sells a pen adapter) for anyone who wants to buy a
| currently in production plotter that's much cheaper than the
| axidraw. I can't compare the two on performance as I haven't used
| an axidraw but my experience with the Silhouette Cameo plus has
| been positive
| genewitch wrote:
| hmm, $100 cheaper than the cricut maker 3 which i mentioned
| elsewhere
| michael_chip wrote:
| Yeah they also come up second hand pretty often. The supplied
| software works but is a bit of a chore to use However there's
| a python tool for sending it SVGs that works really well.
| nxobject wrote:
| Plus, once it's done, you can do all of the other fun things
| that a Cricut-style tool can do.
| JR1427 wrote:
| I made a basic plotter a while ago. You might find it slightly
| interesting https://www.jake-reich.co.uk/plotter
| fuzzfactor wrote:
| I like the way it comes together wonderfully on such a
| beautiful carpet.
| yboris wrote:
| One of my favorite artists using a plotter is Licia He - using
| python to control brush to apply watercolor.
|
| - https://twitter.com/Licia_He
|
| - https://www.instagram.com/blahblahpaperblah/
|
| - https://www.eyesofpanda.com/
|
| She has 20+ Q&A about how she does it:
| https://www.eyesofpanda.com/project/plotter_painting_q_a/ and she
| intends to open source her code someday too I think
| foxbarrington wrote:
| I just got an axidraw and I've been having a lot of fun with it.
| Because it can just use SVGs as is, I could plot a "still"[0]
| from one of my existing generative pieces[1] minutes after
| bringing it home.
|
| What surprised me is how good some plots look and how "cheap"
| others come out. I've made a few that were fun to watch but the
| output isn't nicer than a laser printer.
|
| My current thinking is the more "exotic" the pen and paper is,
| the better.
|
| [0] https://imgur.com/gallery/5t4lWRT
|
| [1] https://david.app/projects/geo-clock
| gilleain wrote:
| > My current thinking is the more "exotic" the pen and paper
| is, the better.
|
| Oh? What makes for 'exotic' materials - like the weight of the
| paper, cold-vs-hot pressed, and so on?
| foxbarrington wrote:
| Right, the less it looks like printer ink and printer paper.
| sleepybrett wrote:
| same conclusions from me, lean into what makes the tool
| different than a regular printer, lean into it's
| imperfection ( improper inkflow, misregistration if using
| more than one color/pass, ink bleed, how it reacts to a
| semi-rough surface ). It is also a very performative tool,
| I've seen some artists using them in that way as well.
| Using both cartesian and polar style hanging plotters on
| gallery wall or glass window. Also hanging polar style
| plotters as a very cost effective way to create very large
| works.
| headcanon wrote:
| Yep, I've been experimenting with metallic gel pens on black
| paper, the result is pretty nice:
|
| https://imgur.com/a/rHHo5c9
|
| The Uni-Ball Signo metallic gel pens have performed pretty
| well, but can drip on the corner when the piece is done and the
| arm returns to origin, so you'll want to pay attention to it:
|
| https://www.amazon.com/dp/B01N7SC6SR
| foxbarrington wrote:
| Love it, going to try them out. What paper do you use?
| headcanon wrote:
| Here you go: https://a.co/d/3zuBvyW
|
| Looks like its unavailable for me right now, but there are
| others you can try.
|
| For white paper, this has worked very well for me:
| https://a.co/d/9qoDwML
| foxbarrington wrote:
| Thanks! Was surprisingly hard to find something that
| looked good on Amazon. I'm thinking it has to be matte
| for the full effect. Probably worth checking out an art
| supply store.
| headcanon wrote:
| Probably. Its definitely worth investing in good paper
| and pens for this hobby. There will be some
| experimentation tax built in too, I've bought pens that
| ended up being garbage but there's no way to know that
| until you try.
| Wingman4l7 wrote:
| You need to run your SVGs through some path optimization!
| Your Axidraw is doing a lot of unnecessary traveling between
| lines. Check here: https://github.com/beardicus/awesome-
| plotters#vector-utiliti...
| headcanon wrote:
| I know, I just didn't bother to do it for that piece since
| I actually wanted to film the jumping around of the arm as
| a demo for friends. I do it for other pieces I actually
| want to optimize using vpype.
| sleepybrett wrote:
| Sakura Gelly Roll White pen is great as well.
| etrautmann wrote:
| This post got me to purchase an Axidraw back in 2017 and I had a
| ton of fun using it to plot neural data I collected during my
| PhD, as well as messing around with generative art. So much more
| worthwhile than I expected for an impulse purchase.
| genewitch wrote:
| I'm just gunna throw this out there: The replacement for the
| axidraw 8.5x11 thing is $699 - a _fully_ loaded cricut maker 3
| is $429, and can, in theory, do actual plotting on sheets
| longer than 11 " - as well as being a vinyl cutting machine. I
| am unsure what models of cricut can take the pen holder, but it
| is something to consider, especially since i am sure there are
| alternatives to the ecosystem that are more open or support
| different software.
|
| Also the ender series of 3d printers can make use of a pen
| attachment as well, but those are 8x8 inches. There are larger
| 3d printers, and the software or whatever to plot with the
| ender 3 was open source enough. My ender3 was <$200
| beardicus wrote:
| my main concern with the cricut and silhouette machines is i
| probably don't want to use the manufacturer's shitted up
| software, and the open source replacements are hacks that
| might be janky and could probably be squashed at any time
| (i'm not actually sure the status of replacement software for
| each of these machines, because i always get them confused
| and haven't paid much attention)
|
| generally, though, i do enjoy taking advantage of scaled-up
| (cheap) commercial products. but i also value supporting an
| open, small business (EMSL, and now Bantam Tools) that is
| active in the communities using its products.
| sleepybrett wrote:
| bre had such a good run with makerbot .. what could
| possibly go wrong?...
| beardicus wrote:
| somewhat fair. i'm not in the market for commercial
| plotters so i guess i can avoid that purchase decision.
| regardless, i'm happy to see them running meetups and
| stuff for plotter folks, and i'm interested in where they
| take the product/software over the next few years.
| michael_chip wrote:
| The open source tools for the Silhouette work pretty well
| in my experience, there's a really well documented python
| library. You're right about the supplied software though,
| it works but it's unpleasant to use.
| etrautmann wrote:
| Sure - use whatever machine you prefer. I found the axidraw
| hardware and software to be good value back then, though it
| looks like the prices are higher now and IP was purchased by
| Bantam tools?
| Wingman4l7 wrote:
| I was initially pretty unhappy with the price bump when the
| Axidraw was re-released by Bantam Tools (who purchased the
| Axidraw IP from Evil Mad Scientist). It went up $150!
| However, if you use Archive.org to look at the old prices on
| EMS's website, it's actually just the price of the Axidraw +
| the brushless servo upgrade kit (which now comes standard on
| it); I think they may have also added an auto-home
| improvement, and possibly other tweaks.
|
| You're really paying for the dedicated use-case design (the
| pen carriage precision on the Axidraw is excellent) and the
| active software support both from the company and the
| community.
| fogleman wrote:
| Hey, it's me! Fun surprise.
|
| I also collaborated with my coworkers during work-sponsored
| hackathons on some other fun plotting machines. One that could
| draw on a huge whiteboard with multiple colors and another whose
| mechanism was based on the Shaper Origin:
|
| https://twitter.com/FogleBird/status/1549798581409824778
|
| https://twitter.com/FogleBird/status/1018296014585978880
|
| Bonus, my favorite tool-path optimization to draw adjacent
| circles:
|
| https://twitter.com/FogleBird/status/1204253487703478274
| kiernanmcgowan wrote:
| Great stuff! I also have an axidraw that I've been using for
| christmas cards and the like. I've been getting more advanced
| each year and I'm resolved to roll up my sleeves and start
| using your libs for total control. SVG generation is neat, but
| has a layer of abstraction :)
| flobosg wrote:
| I'm a huge fan of your RibbonDiagrams bot, so much so that it
| inspired me to write my own one (using a different protein
| representation, of course). Thank you!
| fogleman wrote:
| Nice! Link? I'd like to see what you made.
| BarbaryCoast wrote:
| That's interesting as a programming exercise, but HP's plotters
| all had a built-in language called HP-GL. And there's a GPL'ed
| tool that will emit HP-GL. I just can't recall what it's called.
| Seems like it was built in to some normal printing tool. HP
| Laserjet printers also supported HP-GL, so that was a nice way to
| get your plots without having to buy a more expensive dedicated
| plotter.
| jeffbee wrote:
| Ghostscript can target HPGL.
| beardicus wrote:
| > That's interesting as a programming exercise, but
|
| why is this a "but"? does the existence of HPGL negate the work
| being presented here somehow? modern plotters seem to have less
| capable control languages such as whatever the axidraw does, or
| G-code for most of the open source controllers. I guess folks
| assume you'll just be programmatically generating or converting
| to the output format anyways.
|
| inkscape can output HPGL directly. there's also chiplotle which
| is a python library. i've tried to gather up all the other
| HPGL-related software i could find here:
| https://github.com/beardicus/awesome-plotters#hpgl
| batterylow wrote:
| Pen plotters are great fun. I set mine up a while ago - a
| slightly cheaper setup than most
| https://shahinrostami.com/articles/my-pen-plotter-setup/
| nxobject wrote:
| Part of me wishes that you could use good 'ol HPGL with these
| modern plotters, just for the fun of using vintage software. Plot
| the Joy Division hidden-line 3D graph, or the classic Shuttle
| AutoCAD example.
| dang wrote:
| Related albeit tiny:
|
| _Pen Plotter Programming: The Basics_ -
| https://news.ycombinator.com/item?id=16191811 - Jan 2018 (1
| comment)
| remipch wrote:
| If I had a plotter, I'd try a few things with plotter.vision.
|
| It converts a 3D STL file to SVG with "hidden wireframe removal".
|
| There is also an "anaglyph" mode to output red/blue lines to be
| seen in 3D with red/blue glasses.
|
| The online converter: https://plotter.vision/
|
| More info from Trammell Hudson, the author:
| https://trmm.net/Plotter-Vision/
___________________________________________________________________
(page generated 2024-05-14 23:01 UTC)