4 ms·
Pen Plotter Programming: The Basics (2017)
- gilleain 3y agoHah, 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 3y agoIf you like, you can purchase plotter ribbon diagrams from him: https://www.michaelfogleman.com/plotter/ https://www.michaelfogleman.com/plotter/
- gilleain 3y agoInteresting. 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 3y agoI’m not sure how is he orienting the camera in his library (https://github.com/fogleman/ribbon 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 3y agoLooking at this function: https://github.com/fogleman/ribbon/blob/master/ribbon/camera.go#L26 https://github.com/fogleman/ribbon/blob/master/ribbon/camera... 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 3y agoHe’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 3y agoDefinitely 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.
- gilleain 3y agoOk, I don't mean at all to suggest that there is only one 'right' pose or representation. Different orientations and levels of detail would emphasise different things. For example, it's quite nice that the haemoglobin one is down the central axis of the tetramer, and shows all the haem groups. I would expect almost any image that wanted to show the most parts of that structure to use a similar pose. I had not realised when I asked the question that the poses were picked in code, which is similar to how PDBsum does it (pretty sure Roman Laskowski told me it did, but I would have to check). Something like maximising the number of atoms in the plane of the screen. Of course, when it comes to YFP (your favourite protein), individual researchers are likely going to focus on different parts. My interest was always in the topology, so I would want to see all the helices and sheets, but someone else might want to see the active site front and center. Incidentally, I've heard the term 'molecular porn' used for fancy/shiny looking diagrams - not sure if it applies to these as well :)
- mattdesl 3y agoNice intro! Readers may also appreciate my post “Pen Plotter Art & Algorithms” here: https://mattdesl.svbtle.com/pen-plotter-1 https://mattdesl.svbtle.com/pen-plotter-1
- nfrmatk 3y agoIf you like this you might also like Nick Fitzgerald's 2019 RustConf talk: Flatulence, Crystals, and Happy Little Accidents. https://youtu.be/Ho3xr4b60Zg https://youtu.be/Ho3xr4b60Zg
- beardicus 3y agothanks for this link. i guess i totally missed this five years ago when it was published... fun talk.
- michael_chip 3y agoCan 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 3y agohmm, $100 cheaper than the cricut maker 3 which i mentioned elsewhere
- michael_chip 3y agoYeah 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 3y agoPlus, once it's done, you can do all of the other fun things that a Cricut-style tool can do.
- JR1427 3y agoI made a basic plotter a while ago. You might find it slightly interesting https://www.jake-reich.co.uk/plotter https://www.jake-reich.co.uk/plotter
- fuzzfactor 3y agoI like the way it comes together wonderfully on such a beautiful carpet.
- yboris 3y agoOne of my favorite artists using a plotter is Licia He - using python to control brush to apply watercolor. - https://twitter.com/Licia_He https://twitter.com/Licia_He - https://www.instagram.com/blahblahpaperblah/ https://www.instagram.com/blahblahpaperblah/ - https://www.eyesofpanda.com/ https://www.eyesofpanda.com/ She has 20+ Q&A about how she does it: https://www.eyesofpanda.com/project/plotter_painting_q_a/ https://www.eyesofpanda.com/project/plotter_painting_q_a/ and she intends to open source her code someday too I think
- foxbarrington 3y agoI 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 https://imgur.com/gallery/5t4lWRT [1] https://david.app/projects/geo-clock https://david.app/projects/geo-clock
- gilleain 3y ago> 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 3y agoRight, the less it looks like printer ink and printer paper.
- sleepybrett 3y agosame 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 3y agoYep, I've been experimenting with metallic gel pens on black paper, the result is pretty nice: https://imgur.com/a/rHHo5c9 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 https://www.amazon.com/dp/B01N7SC6SR
- etrautmann 3y agoThis 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 3y agoI'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 3y agomy 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 3y agobre had such a good run with makerbot .. what could possibly go wrong?...
- beardicus 3y agosomewhat 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.
- fogleman 3y agoHey, 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/1549798581409824778 https://twitter.com/FogleBird/status/1018296014585978880 https://twitter.com/FogleBird/status/1018296014585978880 Bonus, my favorite tool-path optimization to draw adjacent circles: https://twitter.com/FogleBird/status/1204253487703478274 https://twitter.com/FogleBird/status/1204253487703478274
- kiernanmcgowan 3y agoGreat 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 3y agoI’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!
- BarbaryCoast 3y agoThat'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 3y agoGhostscript can target HPGL.
- beardicus 3y ago> 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 https://github.com/beardicus/awesome-plotters#hpgl
- batterylow 3y agoPen 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/ https://shahinrostami.com/articles/my-pen-plotter-setup/
- nxobject 3y agoPart 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 3y agoRelated albeit tiny: Pen Plotter Programming: The Basics - https://news.ycombinator.com/item?id=16191811 https://news.ycombinator.com/item?id=16191811 - Jan 2018 (1 comment)
- remipch 3y agoIf 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/ https://plotter.vision/ More info from Trammell Hudson, the author: https://trmm.net/Plotter-Vision/ https://trmm.net/Plotter-Vision/
- timonoko 3y agoI gave up trying to make Axidraw and all that slightly esoteric stuff working and just switched to G-code. (There was something totally wrong in the way snapped Inkscape used Python.) Also because I also have laser plotter and 3D-printer running on G-code. Google could not find any G-code interpreter, which is also slightly weird? https://github.com/timonoko/EBB-Plotteri https://github.com/timonoko/EBB-Plotteri