Select objects of similar size in Inkscape

For the AlgoMech 2019 festival in June I created a new performative drawing piece, A Perfect Circle. The piece is about how we interface with computers that analyse our activities. It consists of a video and accompanying plotter drawings.

Making A Perfect Circle presented me with a few challenges. The make the video element I hacked together a couple of Processing scripts that did basic motion tracking by following a user-specified colour. It would draw these lines, creating new lines (instead of adding to an existing line) at each major turn and giving them a unique colour.

The next stage was to export those drawn lines to SVGs (or PDFs) so that I could export them to Inkscape and then a plotter. Fortunately Processing already has functions for exporting to SVGs. Unfortunately for me if I were to implement this as is suggested in the help file it would export both the drawn line and the background video as a still frame. I produced a very hacky workaround (with help from Ben Neal) which “works” but produces a few unwanted artefacts.

Before I go on I should probably explain what a plotter is as the unwanted artefacts relate to it. For this I will copy from the Wikipedia article on plotters:

The plotter is a computer printer for printing vector graphics. Plotters draw pictures on paper using a pen. In the past, plotters were used in applications such as computer-aided design, as they were able to produce line drawings much faster and of a higher quality than contemporary conventional printers, and small desktop plotters were often used for business graphics.

At home I have a Silhouette Cameo 2 vinyl cutter. When using this great Inkscape plugin I can bypass Silhouette’s proprietary software and send artwork directly to the cutter from Inkscape. Thanks to a pen holder adaptor I can replace the vinyl cutting blades with a pen and turn the vinyl cutter into a plotter 🙂

Back to the Processing sketch. The hacky code that I made produced the desired lines but also it had lots of additional single-node paths/dots at the start of each line.

Removing these wouldn’t be very easy. Using Edit > Select Same > Fill and Stroke or Fill Color or any of the other options wouldn’t work as it would also end up selecting the lines. I then had the bright idea to select objects based on their size. All of the dots had a dimension of 4.057×4.000px, so in theory there would be an option like Edit > Select Same > Size. However, this is not so.

After a discussion on the Inkscape forum I opened a feature request on the Inkscape bug tracker to select objects of similar size. One thing I added to this was the idea of a threshold. Using this you could select objects that were within n% of the size of the selected object. If you’ve ever used GIMP you would have seen a similar function in its fuzzy selection tool This could definitely be useful if you trace bitmaps and it produces a lot of speckles. I also added a mockup to show how it could be applied to other options in the Edit > Select Same menu options.

Anyway, at the moment this exists as a feature request. I think Inkscape is concentrating on delivering version 1.0 of the software so I don’t expect to see this implemented any time soon. As with anything in the land of open source, if you’ve got the skills to do this please contribute!

In the end I used fablabnbg’s Inkscape extension to chain all (or most) of the paths into one big path. This made selecting the dots easier as I could just hide the big path(s) once they were chained together.

After that it was a simple case of sending it to the plotter!

Libre Graphics Meeting – Live Performance with Visual Programming Languages

Tools for Visual Jockying (VJing) have historically been built to manipulate pre-existing video to create live visuals. Over time more experimental approaches have emerged that focus on using programming languages to create visuals in a live performance environment. Using my experiences of VJing at Algoraves and other live performances as a focal point, I will present a critical insight into some of these tools, consider the benefits of a visual approach to coding, and discuss how typical programming functions can be used to create visuals in a live environment.

Blender renders

For the past month or two I’ve been getting my head around Blender to do some 3D modelling. It’s a tough program to learn, but with the aid of some very useful tutorials and strong community support I feel I’m getting somewhere!

As well as using Inkscape to make vectors I want to explore the possibilities of using Blender to render 3D models as vectors. There’s so many benefits of this approach as long as it works. To do this I’ve tried out to vector rendering scripts written in the python programming language, VRM and Pantograph. VRM was easy to install – just dropped the file in the scripts folder – but Pantograph was a bit more problematic. If you’re going to install it make sure you have the right Python libraries installed! Here’s the original Blender output:

Original file rendered in Blender

Original file rendered in Blender

I’m getting some reflection off of my surface, but I’ll work on that another time.

Here’s the results of rendering a simple 3D snake model in Pantograph:

Pantograph render of a snake

Pantograph render of a snake

The Pantograph render produced the smoothest results by far. When taking it into Inkscape the final drawing is separated into several groups. For the snake you had a group for the outline, the silhouette and the wireframe. Depending on the complexity of your model you may want to delete the mesh. The only problem I’ve encountered is separating objects. Pantograph likes to merge to objects together, thus limiting editing capability. Still, you could always do most of the editing in Blender itself

Render from VRM

Render from VRM

This render using VRM reminds me a lot of the old Playstation/Sega Saturn graphics. You could subdivide all of the faces to get it smoother (set smooth has no effect on it), but it’d take forever to render and you’d end up with an unnecessarily large vector (.svg) file. Still, using VRM is useful for relatively simple objects. You could even combine the two renders!