SLStudio.nz blog posts logo

SLStudio.nz blog posts

Archives
Log in
Subscribe
September 9, 2026

Mesmerising Contour Tool

A while back I posted a glimpse of my custom pen-plotting generative tool I’m calling Contour. Let’s take a closer look.

Some background inspiration

The idea for Contour came about while exploring coding with chatGPT where my goal was to produce SVG (scalable vector graphics) path elements from slices of 3D-printed objects via Gcode extraction. I wanted to be able to plot the infill patterns that slicer programs like PrusaSlicer produce when structuring the interior of a 3D print. In particular I was fascinated with the concentric-fill mode. You can do this in Adobe Illustrator or Affinity Designer, but it’s time-consuming and error prone when curve offsets get too large. 3D slicers on the other hand are adept at doing it perfectly and quickly.

Concentric infill without a top layer
Concentric infill without a top layer
An extracted internal layer
An extracted internal layer

During the use of this program I’d created via Python and QT (plus some bro-coding with chatGPT), I thought about other, simpler ways to create complex 2D patterns using images as inputs for aspects of the path generation. I have experience with user-interface building using QT at work, so it was time to build a tool that had knobs and dials I could adjust to quickly create and control different effects.

Inspiration also came from Ollie Lansdell’s DrawingBot software which I have used to produce artworks. DrawingBotsV3 is a complete Swiss-army knife that’ll output layer colour separations and even control your plotter for you to produce artwork directly. I wanted something more lightweight and a place to express my taste in user-interface design choices.

I’d also seen in the Reddit PlotterArt community examples of the Fast-Marching Algorithm. I instantly fell in love with this look because it generates pen-plotter friendly lines that carry their own tone and density. It looks a bit like map topography and is mesmerising to look at (and to watch a plotter draw it). Here’s one of the first examples I produced:

input image
input image
sparse settings
sparse settings
dense settings
dense settings

So I knew one of the first modes I wanted to mess around with was this effect and its variations. You can also provide coordinates for the origin of the ripples. OF COURSE THEY SHOULD COME FROM THE EYEBALLS.

Requirements

This program to have a few features:

  • a drag and drop interface for loading a starting image
  • an image adjustments panel to control input image brightness, contrast, gamma etc
  • an ‘Algorithm’ panel where a drop-down menu lets me choose the effect I’d like to dial.
  • an output panel where I can view the results separately from the input image
  • a way to save the settings in one session (as JSON) and the ability to apply them to another image
  • an Export button that’ll save a .svg file with path elements in it

This time round I decided to get Claude involved (Sonnet-4.5 at that time) for code-assistance as it greatly accelerates the pace of development and let me focus on what the program should do, how it should look and feel. I very quickly had something up and running (the screenshots below are from the current version - much of the early UI appearance is gone now). This is a standalone app running in Mac OS:

Input image
Input image
Fast March controls
Fast March controls
A4 Plotted output
A4 Plotted output

You can see in the middle screenshot where I’m choosing points for the wavefronts to originate. And of course the final plotted output on paper. The generation time for output was slow to begin with, and after discussion with Claude we swapped in C++ in places for a 50x speedup. Now the output could redraw as I moved the slider. Every VFX artist understands the benefit of faster iteration in creative work.

Moar speeeed!

Here’s another example:

Input image
Input image
Contour lines
Contour lines
Plotted output on A4 paper
Plotted output on A4 paper

I quickly found examples of more algorithms online that I could include in the Algorithms panel. With Claude’s help, we were able to digest papers like Bruno Jobard and Wilfrid Lefer’s implementation of evenly spaced streamlines of arbitrary density to produce plotter-friendly effects.

Input image
Input image
Streamlines effect
Streamlines effect

Colours

I wanted better colour control so I could produce multi-colour pen-plots. I wanted Contour to be able to sample the colour from the input image under the lines that it generated and make the lines that colour. But I needed to be able to limit that palette spread, as pen-plotting with many colours is laborious and error-prone. You’ve only got to experience one of your pens ruining a multi-pass plotted piece once to become nervous about it. A single layer passes might take 45mins alone for a complicated element.

Another issue: how do you determine how long the line segments of a certain colour should be before they switch to a colour that is more relevant spatially in the image? After discussion about k-means clustering algorithms and appropriate parameters, the Colours tab was born. Now I was able to export coloured SVG path elements into a single file with separate layers. You can get an idea of the result in the screenshots below:

input image
input image
fast-marching contours
fast-marching contours
line segment colouring
line segment colouring
Colour controls
Colour controls

This gives me control over how many different colours I want to work with, whether I want to sample the colours from the input image or a pre-selected palette as well as the minimum length of a line segment before it’s chopped and switches to a different colour. I can also control whether the colours are mapped by the input image hue or luminance.

Having this capability has led to my most intricate multi-pass pen plot images yet - here’s a selection:

Broker
Broker
Noblewoman
Noblewoman
Marrowblade
Marrowblade
Courier
Courier

Isometric Flow

The most recent algorithm update is one that spawns walking paths from an underlying geometric structure. It’s called Isometric Flow and it’s capable of some really interesting looks. It also can derive its colour palette from a source image, or from its own algorithmic distribution. Here’s some examples:

Geometry
Geometry
Girl with a WTF
Girl with a WTF
output
output
palette from source image
palette from source image
another variation
another variation
I have neck pain
I have neck pain
No prizes for guessing the source here
No prizes for guessing the source here

As usual the process of actually physically producing the artwork is fun to watch:

Jelly Roll pens on black paper is a good time

Thanks for reading! I hope you enjoyed this post - more coming soon. And if you want a sneak peek at my next plotter build, you can view this gallery where I’m posting images of the build in progress: https://www.julianbutler.com/Art/A2-Plotter

-julian

Don't miss what's next. Subscribe to SLStudio.nz blog posts:
slstudio.nz
Powered by Buttondown, the easiest way to start and grow your newsletter.