{"componentChunkName":"component---src-templates-project-detail-js","path":"/project/hashiconf-genart-plotter/","result":{"data":{"site":{"siteMetadata":{"host":"xenodochial-pasteur-bb9d87.netlify.com"}},"markdownRemark":{"html":"<p>HashiCorp's events are something special. A dedicated in-house events team makes sure every single detail is considered and perfected. At HashiConf 2018, in San Francisco, one of the many details was this generative art installation in the HashiCafe.</p>\n<h2>Purpose</h2>\n<p>First, let's be clear that this is art and art doesn't need a purpose. If you go through life constantly searching for meaning, you will leave this world disappointed. But, this particular installation was a piece of a larger puzzle and it did have some purpose.</p>\n<p>We wanted something fun, creative, and unexpected. A lot of people who go to tech conferences go to <em>a lot</em> of tech conferences, and they can all start feeling the same. It takes something special to break that rhythmic monotony. A 2D plotter sitting modestly in a cafe does exactly that.</p>\n<p>We also wanted something physical. Engineers write code all the time, so seeing things off screen is a treat. Watching the <a href=\"\">AxiDraw</a> plotter is a treat in itself.</p>\n<p>Lastly, we wanted something that could be taken home.</p>\n<p>Putting this all together meant a generative art piece that tied into the HashiCorp brand and plotted fast enough that we could make a lot of them over the two days.</p>\n<h2>Writing the code</h2>\n<p>HashiCorp has <a href=\"\">really strong product brands</a>, so I had no shortage of imagery and motifs to work with, but everything had to be implemented as code. Fortunately our branding is rather geometric, but it's eye-opening how much math programs like Illustrator and Sketch are doing that we just take for granted.</p>\n<p>In order to draw lines within a polygon, I had to write a clipping mask implementation* from scratch. Things went from \"I'm having fun with shapes\" to \"slope intercepts, quadratic formula, normal vectors, oh my!\" really fast. Honestly the math just added to the fun. It meant everything took longer than expected, but I was more than okay with taking it slow and enjoying exploring more computational geometry.</p>\n<blockquote class=\"twitter-tweet\" data-conversation=\"none\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Normally I would do something cheeky like draw black rectangles over the inverse of the bounding box, or use a clipping mask when available, but having the pure arc paths allows for cool things like this. It&#39;s also (hopefully) plotter safe! <a href=\"https://t.co/UrWgK9v4TW\">pic.twitter.com/UrWgK9v4TW</a></p>&mdash; Michael Lange (@DingoEatingFuzz) <a href=\"https://twitter.com/DingoEatingFuzz/status/1038837090836918272?ref_src=twsrc%5Etfw\">September 9, 2018</a></blockquote>\n<p>The end result was a single program that would generate an SVG of a random product grid for a given seed. This SVG was then plotted with the AxiDraw plotter.</p>\n<p><small>*Okay, it's not a <em>complete</em> implementation, but it works for arbitrary lines and circles in an arbitrary polygon.</small></p>\n<h2>Working with the plotter</h2>\n<p>Before this project, I had never used an AxiDraw. I knew going in that I would need some alone time with the plotter to learn how it works and pick up some best practices. This meant figuring out how to scale an SVG to a piece of paper and align that with a piece of paper underneath the plotter's pen arm. It also meant experimenting with different papers and inks to see what works and what doesn't.</p>\n<p>Since the theme of HashiConf was black and gold, we wanted to also use black and gold with this generative art to tie the theme in. We ended up using a nice black card stock along with gold gelly pens. Although gelly pens sound childish, they resulted in truly beautiful shimmering line art. However, gelly pens lay ink down thick. With SVGs, lines can be infinitesimally thin, so translating what was an acceptable line thickeness and distance on the screen to the paper took some trial and error. If artwork was too dense, it would be plotted as a blob. If artwork was too sparse, large, or simple it would compromise the overall composition or branding.</p>\n<p>Lastly, there is a fair amount of finesse that needs to go into setting up any pen in the plotter. The pen is lowered to the paper by gravity, so putting the pen in too tightly creates friction that may mean the pen won't make it down to the paper by the time the plotter driver thinks it has. Conversely, a loose pen may not go up and down at all, causing drag marks. Although ideally this would never happen, it's easily prevented with some practice.</p>\n<h2>The performance</h2>\n<p>After writing the code to generate the art and working with the plotter to choose the best paper and ink as well as dial in the art to make sure it plots well, everything was done end to end. However, we wanted to make as many plots as we could in two days, and everyone who staffs HashiConf is wearing many hats: giving talks, doing booth duty, meeting with customers, etc. This meant the performance of plotting on site needed to be thought through for the most success.</p>\n<p>The single most effective way to ensure everything went smoothly was to automate as much of this process as possible. The standard way to use the AxiDraw plotter is to create an SVG however you like, then use Inkscape to layout the graphic and send it to the plotter. This is a tedious process that requires a lot of prep work. It's not so bad when you are only making one plot, but we were making 100+ plots. Fortunately, the fine folks at AxiDraw have been working on a CLI tool and a Python SDK for exactly our purpose.</p>\n<p>Using the CLI tool and the SDK, I was able to construct a make file that had targets for</p>\n<ol>\n<li>Invoking Processing to generate an SVG and save it to disk</li>\n<li>Raise and lower the plotter pen</li>\n<li>Reset the plotter motors (to change pens and manually push it back to the origin point)</li>\n<li>Tell the plotter to plot the SVG Processing generated</li>\n</ol>\n<p>All this together made operating the plotter quite simple. A single command, <code class=\"language-text\">make generate &amp;&amp; make plot</code> would create a graphic and plot it. If a pen ran out of ink or if something went haywire in any way, <code class=\"language-text\">make raise</code> would lift the pen off the paper, and <code class=\"language-text\">make release-motors</code> would allow the operator to manually reset the position of the pen. Staff were able to be trained on the plotter in less than 10 minutes, so we could cycle shifts throughout the conference.</p>\n<p>The last piece of the performance was creating a preview screen so it was a little more obvious what the plotter was doing. This ended up being a quick and dirty little express server I wrote the day before. It watched the filesystem for changes to the SVG file the plotter looked for and used a websocket to send that new SVG over to a web browser. The client page styled the SVG in black and gold using CSS as you'd imagine.</p>\n<p>All this together made for a pretty seamless performance. Next time I'll do a better job estimating how much paper and ink we'll go through, so I won't have to make another emergency trip to the art store.</p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Only at HashiConf, you can get a plotter-print of HashiCorp tools. Each background is randomized and totally unique! <a href=\"https://twitter.com/DingoEatingFuzz?ref_src=twsrc%5Etfw\">@DingoEatingFuzz</a> <a href=\"https://t.co/YIcSEuzAdl\">pic.twitter.com/YIcSEuzAdl</a></p>&mdash; Mitchell Hashimoto (@mitchellh) <a href=\"https://twitter.com/mitchellh/status/1054827741890002945?ref_src=twsrc%5Etfw\">October 23, 2018</a></blockquote>\n<h2>Technology used</h2>\n<ul>\n<li>Processing</li>\n<li>Python</li>\n<li>Axidraw</li>\n<li>Express</li>\n<li>Make</li>\n</ul>","fields":{"id":"hashiconf-genart-plotter"}},"dataProjectsToml":{"projects":[{"name":"Nomad Web UI","slug":"nomad-web-ui","tags":["JavaScript","EmberJS","Cluster Scheduler","DevOps","Work"],"url":"https://nomadproject.io","year":2018,"thumbnail":"nomad-ui.png","description":"The Web UI for the Nomad cluster scheduler developed and maintained by HashiCorp. Cluster schedulers are tools designed to take arbitrary workloads and run them on arbitrary computers in a cluster. The UI helps operators in an organization maintain availability of services and computation while monitoring resources across the cluster. The UI also helps developers deploy their own services without needing the expertise operators sepcialize in.\n"},{"name":"HashiConf Generative Art Plotter","slug":"hashiconf-genart-plotter","tags":["Processing","Generative Art","SVG"],"url":null,"year":2018,"thumbnail":"hashiconf-genart-plotter.jpg","description":"An art installation at HashiConf 2018. Throughout the two conference days, the 2D plotter and a preview monitor were installed in the HashiCafe for attendees to watch and (if they were lucky) take home a one-of-a-kind keepsake.\n"},{"name":"CIVIC Platform","slug":"civic-platform","tags":["JavaScript","Data Visualization","Python","Leadership","Volunteering"],"url":"https://civicplatform.org","year":2018,"thumbnail":"civic-platform.png","description":"The CIVIC Platform is the flagship product from the CIVIC Software foundation: a non-profit I am the volunteer CTO of. The platform facilitates a data pipeline, moving public data into structured, queryable databases in the cloud. It exposes numerous APIs for building tools and stories with public data. It also comes with a web application that curates stories in the form of cards to show insights that are consumable by any citizen.\n"},{"name":"U.S. in Water","slug":"us-in-water","tags":["JavaScript","Cartography","Tippecanoe","GCP"],"url":"http://stuff.mlange.io/wc-final","year":2017,"thumbnail":"us-in-water.png","description":"A detailed look at all the rivers, streams, and bodies of water in the United States as tracked in the <a href=\"https://nhd.usgs.gov/\">USGS National Hydrography Dataset</a>. Many gigabytes of data were converted into vector tiles using Mapbox's Tippecanoe tool.\n"},{"name":"Climb Tracker","slug":"climb-tracker","tags":["JavaScript","React","Firebase"],"url":"https://climb.mlange.io","year":2016,"thumbnail":"ct-tracker-thumb.png","description":"A simple web app for tracking bouldering workouts. It focuses on quickly marking which problems were completed and which were attempted. In this way, at the end of the workout, a histogram and tally of problems and problem difficulties is plotted. There are also monthly reports to look back on.\n"},{"name":"Emoji Skin Tone Randomizer","slug":"emoji-skin-tone-randomizer","tags":["JavaScript","Chrome"],"url":"https://github.com/DingoEatingFuzz/chrome-emoji-skin-tone-randomizer","year":2016,"thumbnail":"emoji-skin-tones.png","description":"A chrome extension for assigning a random skin tone to a skin tone eligible emoji that doesn't already have one assigned.\n"},{"name":"Headers Middleman","slug":"headers-middleman","tags":["JavaScript","React","Chrome"],"url":"https://github.com/DingoEatingFuzz/chrome-headers-middleman","year":2015,"thumbnail":"headers-middle-man.png","description":"A chrome extension for modifying the headers of HTTP Requests based on regex pattern matching.\n"},{"name":"NPR Songs We Love Bookmarklets","slug":"npr-songs-we-love","tags":["JavaScript","Browsers"],"url":"https://github.com/DingoEatingFuzz/npr-music-we-love-bookmarklets","year":2015,"thumbnail":"npr-songs-we-love.png","description":"The NPR Songs We Love app was a wonderful thing, but it had no way to pin/favorite/star/save the tracks you liked. This was solvable in many ways, but the way that sounded the most interesting at the time was bookmarklets. With a click of a bookmarklet, the track would be saved to localstorage. I went overboard and created additional bookmarklets for seeing the track list and for disliking tracks. You know, just for fun.\n"},{"name":"Github Avatar Arrangement","slug":"github-avatar-arrangement","tags":["Python","Processing"],"url":"https://github.com/DingoEatingFuzz/github-gravatars","year":2014,"thumbnail":"github-gravatars.png","description":"A quick sketch that generates all possible Github Avatars (not including color variations). Since Github default avatars are created through the toggling of 15 states, the resulting space is only 2<sup>15</sup>. Which is high, but not so high it isn't presentable in a single image.\n"}],"images":[{"project":"hashiconf-genart-plotter","url":"/images/hashiconf-genart-plotter.jpg","alt":"A finished plot of the Consul product","caption":"Each of the six HashiCorp products can potentially be plotted via the generative art algorithm. This is an example of the Consul product, which is the only product\ngrid that features circles.\n"},{"project":"hashiconf-genart-plotter","url":"/images/hashiconf-genart-plotter-nomad.jpg","alt":"A finished plot of the Nomad product","caption":"This is an example of the Nomad product. Each plot is unique, so although each product grid is typically very well ordered, here they are not.\nUsing perlin noise, some lines are dropped, spaced irregularly, and slightly rotated.\n"},{"project":"hashiconf-genart-plotter","url":"/images/hashiconf-genart-plotter-terraform.jpg","alt":"A finished plot of the Terraform product","caption":"To prevent the art from going to abstract, each plot includes the product logo, stylized in a way that complements the line art a plotter produces.\nThen, to tie the plot to the event, the latest product version number is plotted to hopefully invoke nostalgia years later.\n"},{"project":"us-in-water","url":"/images/us-in-water-fullscreen.png","alt":"A fullscreen seenshot of the U.S. in Water project","caption":"The project is presented as a minimalist map with a set of clickable features on the left-hand side. The features on the left are hand-picked coordinates\nthat I think are interesting to look at.\n"},{"project":"us-in-water","url":"/images/us-in-water-central-california.png","alt":"Central California in the U.S. in Water map","caption":"Central California has well-documented flowlines, which make for a rich picture of the passage of water.\n"},{"project":"us-in-water","url":"/images/us-in-water-louisiana.png","alt":"Louisiana in the U.S. in Water map","caption":"As the state sinks and eordes while the gulf rises, the total land area of Luisiana is shrinking.\n"},{"project":"us-in-water","url":"/images/us-in-water-mt-hood.png","alt":"Mt. Hood in the U.S. in Water map","caption":"The shape of Mt. Hood is distinct through the features of glaciers and lakes alone.\n"},{"project":"us-in-water","url":"/images/us-in-water-salton-sea.png","alt":"Salton Sea in the U.S. in Water map","caption":"The Salton Sea is the biggest lake in California. Evident in the water lines, there are massive-scale feats of engineering surrounding the lake.\n"},{"project":"civic-platform","url":"/images/civic-platform-overview.png","alt":"The CIVIC Platform home page","caption":"The CIVIC Platform website is a gateway to a suite of story cards that each provide an interactive tool or insight that lets people understand their city a little bit better.\n"},{"project":"civic-platform","url":"/images/civic-platform-housing.png","alt":"A story card in the 2018 housing collection","caption":"All StoryCards aim to have some explanation, some data visualization, and some interactivity.\n"},{"project":"civic-platform","url":"/images/civic-platform-disaster.png","alt":"A multivariate plot chart in the 2018 disaster collection","caption":"The frontend <a href=\"https://github.com/hackoregon/civic\" target=\"_blank\" />civic frontend repo</a> provides a collection of a UI components that enable quickly making rich and interactive visual explanations.\n"},{"project":"civic-platform","url":"/images/civic-platform-sandbox.png","alt":"The CIVIC platform sandbox","caption":"The CIVIC sandbox is a feature of the CIVIC platform that gives people a chance to dive deeper into data without having to make the jump into developer tools to run databases and notebooks locally.\n"},{"project":"climb-tracker","url":"/images/ct-home.png","alt":"The landing page for the Climb Tracker app","caption":"A straight-forward page that markets some features and requires auth. The background photo I took in Zion National Park.\n"},{"project":"climb-tracker","url":"/images/ct-tracker-blank.png","alt":"The Climb Tracker tracker with nothing tracked yet","caption":"This is the screen you see after authenticating. It is the tracker, which is the primary experience. It has two features which are immediately\nidentifiable: a list of colored buttons for tracking a climb of a difficulty, and an undo button in the event you track something in error.\nThe third less obvious feature is the \"A\" button, which marks attempts at problems.\n"},{"project":"climb-tracker","url":"/images/ct-tracker-full.png","alt":"The Climb Tracker tracker with various climbs tracked","caption":"As you use the climb tracker throughout your session, a histogram is formed that makes it very clear which difficulties you are focusing on.\nThis can be used to tell you when your warmup is done, if you're pushing yourself too hard and maybe that's why you aren't finishing anything, or\nsimply, what your success rate per difficulty is. The stripe-textured regions denote attempts.\n"},{"project":"climb-tracker","url":"/images/ct-reports.png","alt":"The Climb Tracker reports section","caption":"The reports section gives you a detailed memory of your climbing progress and frequency over time. The dashboard metrics at the top\nare useful for quick stats for the current month. Proceeding the dashboard metrics are monthly report cards that feature kabob\ncharts to illustrate difficulty histograms over time.\n"},{"project":"headers-middleman","url":"/images/headers-middle-man-large.png","alt":"Headers Middleman options page","caption":"The options page for Headers Middleman. Used to add \"rules\", which are regular expressions that match URLs, and \"headers\" which can be values\nfor new headers, values to override headers, or removing an unwanted header.\n"},{"project":"npr-songs-we-love","url":"/images/songs-we-love-love.png","alt":"NPR Songs We Love love indication","caption":"Since clicking a bookmark to add an entry to local storage gives no feedback to the user, this heart is flashed on the screen. It's just slapped\ninto the DOM with some jQuery.\n"},{"project":"npr-songs-we-love","url":"/images/songs-we-love-hate.png","alt":"NPR Songs We Love hate indication","caption":"Hate is a nearly identical bookmark to Love. The only differences are the local storage key and the hotlinked icon URL.\n"},{"project":"npr-songs-we-love","url":"/images/songs-we-love-list.png","alt":"NPR Songs We Love love list","caption":"The Love List bookmarklet acts as a toggle. If the Love List element is found on the page, it's removed, otherwise it's added. This ended up being\na tricky bookmarklet since it contains full blown templating for binding the loved track data. Included in this project write up is\na sample of what that templating looks like.\n"},{"project":"npr-songs-we-love","url":"/images/songs-we-love-bookmarklets.png","alt":"NPR Songs We Love bookmarklet page","caption":"This was the quick and dirty \"installation\" page. A user interested in this augmentation to the Songs We Love 2014 app would drag these links\ninto their bookmark bar. The trick being that they aren't your typical link. They take the form of <code>javascript:&lt;insert-lots-of-javascript-here&gt;</code>.\n"},{"project":"nomad-web-ui","url":"/images/nomad-ui-jobs.png","alt":"Nomad UI jobs list","caption":"The Jobs List page serves as the home page for developers interacting with Nomad. It represents all software known to the cluster.\n"},{"project":"nomad-web-ui","url":"/images/nomad-ui-deployments.png","alt":"Nomad UI job deployments","caption":"Nomad supports automatic rolling and green/blue deployments as well as optional canary deployments. All of this is represented in the UI\nand kept up to date in realtime.\n"},{"project":"nomad-web-ui","url":"/images/nomad-ui-logs.png","alt":"Nomad UI stdout log streaming","caption":"Nomad also has a streaming HTTP API for tailing logs for allocations. The UI lets any privileged user see these logs using fetch and streaming\nrequests when possible and falling back to polling otherwise.\n"},{"project":"nomad-web-ui","url":"/images/nomad-ui-stats.png","alt":"Nomad UI metrics over time","caption":"Stats in Nomad are not stored, but the UI makes a best effort attempt at tracking data over time by storing previous values in memory,\naccounting for skipped data, and persisting historical data (up to a limit) between page views.\n"}]}},"pageContext":{"slug":"/project/hashiconf-genart-plotter/"}},"staticQueryHashes":[]}