Rectangular Loom Art in Tableau

A few months ago, I shared a process for creating Loom Art in Tableau. I was thrilled with the response it received and even more thrilled to see people use it in creative ways, such as the London TUG leaders using it for a fun quiz. Since then, I’ve had a couple of people ask if the code could be modified to allow loom art images to be created in a rectangular pattern, which would allow for more normal photo cropping than the circular images in the original post. I thought that it couldn’t possibly be too hard to make the modification. It turns out I was wrong, but after pouring over the code and making numerous changes, I was finally able to get it working as desired. Here’s a sample using the famous portrait, Afghan Girl, by Steve McCurry:

The process for creating these are pretty much the same as the circular loom art, but I’ll reiterate them here.

1.  Download and install the Processing IDE:
2.  Download the RectangleStringPicture.pde file from my Github repository:
3.  Open the RectangleStringPicture.pde file in Processing.
4.  Follow the instructions in the comment block at the top of the code.
5.  The program will output a csv file. Connect to it with Tableau.
6.  Move Xto the Columns shelf and Y to the Rows shelf.
7.  Move Path to the Detail card.
8.  Change the chart type to Line.
9.  Move Path  Order to the Path card, then change it to a Dimension.
10.  Change the size of the lines to the smallest possible.
11.  Change the color to black (or whatever thread color you prefer).
12.  Change the color transparency to a low value (5-15% seems to work well).
13.  Change the y-axis to Reversed.

The screenshot below shows the final result.

Ken Flerlage, February 3, 2018


  1. Ken, Your work is inspiring. I downloaded the Afghan CSV file with coordinates, however I don't know how to read it. As I understand it, there are 250 points on the rectangle (63,62,63,62); that's about as far as I got. I would like to make a string art version of the Afghan Girl, could you provide instructions on how to read the CSV file, so that I may transfer that to string placement on the nail grid. Thanks in advance. Costas from Variko Culture.

    1. Might be easiest to deal with this offline. Would you email me at

  2. Dear Ken Flerlage, you did a great job, I just found your blog today, I don't know how to code, according to your instructions, it didn't work, I don't know where to write SETUP() to add an image, file name, I wrote it like this:void setup(){
    size(800, 700);
    picX = 80;
    picY = 60;
    gege.jpg is my image file, it's not working, can you take a moment to help me? I'm looking forward to seeing what your program can do for me!

    1. Could you email me with further details?


Powered by Blogger.