Casualty 14-18 ~ The making of a generative artwork by Richard Bolam – Part 8 #bolamat50 #casualty1418 #WW1

Screen shot 2014-08-07 at 16.07.58

By the way, I am not an expert programmer and the code published here is experimental and comes with absolutely NO WARRANTY WHATSOEVER, so please USE AT YOUR OWN RISK.

Okay, pick the bones out of this one.

FILENAMES2=’-a ‘`echo $FILENAMES | sed ‘s/ / -a /g’`

Every space and flying ant is very specific and those “back-ticks” are not optional. This code fragment simultaneously illustrates what is both good and bad about linux / unix. Although I am still a bit of a noob with Bash, I can now reliably produce working code that actually does things I want. However, I am still regularly stumped by the unintuitive subtleties of the syntax.

Also, although there is a wealth of documentation online, much of it is incomplete and/or it does not necessarily work exactly the same on different implementations of Linux. I am not sure how much of this is due to my use of Mac OS X.

Anyway, it took a few hours of every combination of trial and error and a few leaps of faith to get this part of the script working. What I was trying to get working here is the automation of emailing the blog posts. I found a very helpful post on

The Linux mail command does exactly what you would think, but it does not support attachments. However, there is an other command mutt which does the same but adds a lot more functionality. It’s deceptively simple to send an email from the command line, but for a while I could not work out how to add multiple attachments, and this is the bit that required a bit of head-banging.

If you google search sending multiple attachments you get lots of references to adding “-a” flag to each of the filenames, but I need to add a whole folder full and don’t want to have to list them verbosely.

I will not keep you guessing as long as it took me (and this might not be the best method) but just passing a list of file/path names after the first “-a” attachment flag does not work no matter what I tried. Anyway, with a bit of lateral thinking I wondered if I could programmatically format a list of file/pathnames as a string with a “-a” in front of each one.

This kind of preprocessing is where Bash programming really excels, and I found reference to the sed (stream editor) command to substitute the string” -a ” instead of the single spaces separating the derived list. That leaves the first file without a flag, hence the literal at the beginning of the calculation.

Code fragment:

#email images to a blog post
FILENAMES2=’-a ‘`echo $FILENAMES | sed ‘s/ / -a /g’`
echo ‘[tags #casualty1418,#bolamat50,#WW1,Casualty,Casualty 14-18,#firstworldwar,First World War,generative,algorithmic,art,Richard Bolam,Bolam Retrospective,#bolamat50][nogallery]’ | mutt $FILENAMES2 -s ‘Casualty 14-18 ~ ‘$(date +”%d/%m/%y”)’ #casualty1418 #WW1 – test post’

WordPress has a very full implementation of formatting options for emailing blog posts to your own blog. You have to create a unique email address and you can include various tags to add features to the post. The code here includes meta tags and an instruction to keep the images as a series of inline images rather than a gallery.

The next stage will be to add a tag to schedule the posts for a specific time and date. More soon…




Casualty 14-18 ~ The making of a generative artwork by Richard Bolam – Part 7 #bolamat50 #casualty1418 #WW1

This is where it’s starting to get interesting. I decided to add a routine to colour figures from the top left to make it look more like a cumulative pictogram. This is merely a visual effect and not representing any real data, but it prompts the recognition of cumulative data based upon the Western top-left to bottom-right reading order.


The first version of this bit of code stamps individual figures over the top of the already created array of black figures, one-by-one, along rows until it reaches a randomly derived limit. However, immediately after finishing this code, I realised that is a very inefficient way of colouring the existing figures, although it works fine.

If the code is going to colourise this new selection of figures the same colour, it is much more efficient to do it in a block rather than one figure at a time. Or should I say, in two blocks, one for the full rows and one for the partial final row.

Screen shot 2014-08-06 at 12.35.33

I have left in the one-by-one routine as I might use it later to alter figures one at a time but still in a cumulative order. I have commented it out for the time being.

I have also added a couple of variables to hold RGB colour values, rather than just generating them randomly on-the-fly, or literally.

Code fragment:

#pad figure
UNITCOL1=”$[RANDOM % 255],$[RANDOM % 255],$[RANDOM % 255]”
UNITCOL2=”$[RANDOM % 255],$[RANDOM % 255],$[RANDOM % 255]”
convert casualty.png -gravity center -extent 20×38 casualtypad.png
convert casualtypad.png -transparent white casualtypad.png
convert casualtypad.png -fill “rgba($UNITCOL1)” -colorize 100% casualtycolour.png
convert casualtycolour.png -transparent white casualtycolour.png

#create tiled image of figures & make background transparent
convert -size 400×646 xc:white -composite tile:casualtypad.png casualtytiled.png
convert casualtytiled.png -transparent white casualtytiled.png

#create a top-left to bottom-right flow of figures row-by-row
echo $”UNITCOUNT = “$UNITCOUNT” : j=”$j
echo $”UNITCOUNT = “$UNITCOUNT#” – “$UNITROWS” rows, “$UNITCOLUMNS” columns”
#for v in $( gseq $UNITROWS )
# for h in {1..20}
# do
# composite -dissolve “50,100” -geometry +$[($h – 1) * 20]+$[($v – 1) * 38] casualtycolour.png casualtytiled.png casualtytiled.png
# echo $[$h * 20]”-“$[$v * 38]
# done
#for h in $( gseq $UNITCOLUMNS )
# composite -dissolve “50,100” -geometry +$[($h – 1) * 20]+$[($UNITROWS – 1) * 38] casualtycolour.png casualtytiled.png casualtytiled.png

#echo $j’/’$UNITCOUNT

# create top-left to bottom-right flow of figures using colourised blocks
echo “bottom “$[$UNITROWS * 38]
if [ $UNITROWS -ne 0 ] ; then
convert casualtytiled.png -region 400x$[$UNITROWS * 38]+0+0 -fill “rgba($UNITCOL1)” -colorize 30% casualtytiled.png
if [ $UNITCOLUMNS -ne 0 ] ; then
convert casualtytiled.png -region $[$UNITCOLUMNS * 20]x38+0+$[$UNITROWS * 38] -fill “rgba($UNITCOL1)” -colorize 30% casualtytiled.png

The results of the new additions bring much more subtlety and depth to the images. This new code will be implemented at the end of the week.

However, a more pressing addition is the automation of blog post creation and batch processing of multiple days. So far, I am still creating the pages manually.



Casualty 14-18 – How many is too many? – Counting the dead. #casualty1418 #WW1 #bolamat50

The answer to the question should be pretty obvious. One.

I am not interested in adopting an academic approach to art, I think it only leads to self-conscious and overly-rationalised work. However, if your work references the real world, it is your duty to at least get your facts straight. Otherwise how can it have any authenticity?

As I have been researching the First World War, I am horrified. Although it has been thoroughly documented for a century, the details are endlessly shocking.

These days, every single death in whichever war is currently of interest to our news channels is individually recorded, often in a mawkish reverence that only serves to underline the bias of what we are allowed to know about.

My work “Casualty 14-18” is an attempt at comprehending something of the scale of the tragedy visited upon half the world by the vanity of an undeservingly privileged few.

However, if the First World War could not have lead to an anarchist utopia, then there truly is no hope for the human race, and this is only reinforced by the fact that it was repeated and multiplied a mere 25 years later.

I got my figure of 16 million from wikipedia, although I had originally gathered the figure of 15 million from other sources.

The Telegraph quotes 8.5 million and the BBC TV drama serial “37 days” quotes 10 million in its epilogue. I believe the figures up to 10 million do not include civilian deaths, but why would you not include them?

I chose the 28th July as the starting date of my Casualty 14-18 work as it is the date that the first shots were fired. Today is the 4th of August, the centenary of the British ultimatum to Kaiser Bill which, to my mind at least, is too anglocentric, but whatever. We all have to choose a number, choose a date and do something with it.


Although the First World War is over a long time ago, wars continue and casualties accumulate, and not only in Gaza. Also currently in Ukraine, Syria, Iraq, Egypt etc etc etc. Not all officially declared wars, and not all of them of any interest to the British government or British media.

I make no claim to be a historian so I get my list of ongoing armed conflicts from Wikipedia via the Uppsala Conflict Data Program.

How many is too many? It seems that there is no upper limit.

Casualty 14-18 ~ The making of a generative artwork by Richard Bolam – Part 6 #bolamat50 #casualty1418 #WW1

Screen shot 2014-08-02 at 16.40.24

This iteration of the software adds a random number individually colourised figures to the images.

I put in code to duplicate the basic figure, colourise it and then use it to individually overprint and colourise the black figures. I have highlighted the new code in a different colour. It uses the “composite” command and a dissolve operation to change the colour of the figures.

Although this is linux Bash scripting, I am doing the development on Mac OS X and I ran into a problem trying to get the loop working. On OS X there is no implementation of the “seq” command, which I believe is very widely used in Bash, but after a bit of googling, I found an workalike implementation as “gseq”, and this needs to be installed via coreutils in the usual way:

$ sudo port install coreutils

#casualty make script v9
mkdir ‘Casualty1418-‘$(date +”%y_%m_%d”)
PATHNAME=’Casualty1418-‘$(date +”%y_%m_%d/”)

for i in {1..30}

#pad figure
convert casualty.png -gravity center -extent 20×38 casualtypad.png
convert casualtypad.png -transparent white casualtypad.png
convert casualtypad.png -fill “rgba($[RANDOM % 255],$[RANDOM % 255],$[RANDOM % 255])” -colorize 100% casualtycolour.png
convert casualtycolour.png -transparent white casualtycolour.png

#create tiled image of figures & make background transparent
convert -size 400×646 xc:white -composite tile:casualtypad.png casualtytiled.png
convert casualtytiled.png -transparent white casualtytiled.png

#colourise regions
REPEATS=$[1 + RANDOM % 20]

for r in {1..3}

LEFT=$[$[RANDOM % 20]]
TOP=$[$[RANDOM % 17]]
RIGHT=$[$[RANDOM % (20 – $LEFT)]]
BOTTOM=$[$[RANDOM % (17 – $TOP)]]

convert casualtytiled.png -region $[$LEFT * 20]x$[$TOP * 38]+$[$RIGHT * 20]+$[$BOTTOM * 38] -fill “rgba(255,255,255)” -colorize 20% casualtytiled.png

#add some individual figures
for e in $( gseq $MAXCOUNT )
echo $e”/”$MAXCOUNT
composite -dissolve “$[RANDOM % 100],100” -geometry +$[($[RANDOM % 20]) * 20]+$[($[RANDOM % 17]) * 38] casualtycolour.png casualtytiled.png casualtytiled.png

#create page dimensions
convert casualtytiled.png -bordercolor white -border 99×90 casualtypage.png
convert casualtypage.png -gravity north -extent 598×850 casualtypage.png

#create label
convert -background white -font Gill-Sans -pointsize 10 -size 598×20 -gravity center label:’Casualty 14-18 ~ ‘$(date +”%d/%m/%y”)’ – ‘$(printf %02d $i) Casualtylabel.png

#composite page & label
FILENAME=’Casualty1418-‘$(date +”%y_%m_%d-“)$(printf %02d $i)’.png’

convert casualtypage.png -page +0+760 casualtylabel.png -layers flatten $PATHNAME$FILENAME




Casualty 14-18 ~ The making of a generative artwork by Richard Bolam – Part 1 #bolamat50 #WW1 #casualty1418

Screen shot 2014-07-22 at 14.08.55

Back in 2001, I had the idea for “Casualty” as a non-specific commemoration of casualties in conflict or other tragic loss of life. I have always been fascinated by infographics, especially pictographs, and I can remember seeing representations of war casualties in books when I was young. I was intrigued by the scale that these often cartoon-like figures attempt to represent, but simultaneously fail to communicate, of the real horror of acts of industrialised murder.

 Screen shot 2014-07-22 at 14.17.15

My first sketches show how I originally intended to use a variety of symbols to represent men, women and children but, after some experimentation, I decided to settle on a single humanoid figure in order to imply the notion of human equality, despite it being a recognisably adult male figure.

I also experiment with symbolic representations of race/religion/creed by adding a motif to the figure’s chest. The obvious allusion is to the Christian crucifix, which I altered slightly by making it more of a Maltese Cross. I am still not sure if the symbols will make it into the final work, but I have fours years and three months to think about it.

I designed the shape of the figure based upon commonly-used stick-men and as a bitmap, but for a long time I intended to create a vector version that could be scaled and manipulated more subtly. After many years of looking at this work on and off, I have finally settled on using the original bitmap figure which measures only 17 by 35 pixels.

Screen shot 2014-07-22 at 14.17.37

The technical brief is to compile and represent a figure for each of the estimated number of casualties and publish them online every day, from 28th July 2014 until the 11th November 2018.

Why those dates? In Britain, the 5th of August is often cited as the beginning of WW1 but that is based upon the ultimatum that was given to Kaiser Wilhelm that ran out at midnight on August 4th, meaning that Britain was officially at war with Germany. However, the first shots were fired on the 28th of July 1914 although, arguably, the first shot was fired on 28 of June when Archduke Ferdinand was assassinated in Sarajevo. Also, the war did not officially end on 11th November 1918.

However, it’s not a literal work, and not solely about the British, so I chose the period from the first day of fighting until Armistice Day. That’s 1,568 days, and if you take the estimate of 16,000,000 deaths and divide it by the number of days you get approximately 30 pages of 340 figures every single day for the entire four years and three months. That’s an approximate average of 10,200 deaths every day for the duration of the war.

Having decided on an infographic / office aesthetic for the work, I decided to create all the figures in an array of 20 by 17 on an A4 sheet. This is partly for aesthetic reasons and partly for practical reasons. Although it might be more individual to create a singular image for each of the lives lost, it’s not even remotely practical, and any smaller and they start to lose any meaning.

It’s all easily said, of course, but how do I create so many and publish them automatically without turning it into four years’ hard labour for myself? Having thought about it a lot, I have decided on a mixture of techniques that allow me to automate it, vary it and monitor the work as it progresses. It’s quite possible that I will adapt the workflow as it goes along.

Here’s the technical proposal with a week to go. I will be publishing the code and workflow in detail.

Screen shot 2014-06-28 at 17.23.51

Each of the A4 page-sized images are created with a Linux Bash script using ImageMagick to composite and individualise the pages and save them as PNG bitmaps.

A batch of 30 pages per day (10,200 figures) are automatically emailed to a WordPress blog and tagged to publish on consecutive days. WordPress is very sophisticated and supports emailed blog posts with embedded codes to publish at specific times and dates. The blog is already set-up to publish a link to each blog post on Facebook, Twitter and Google+ with appropriate titling, hash-tags and meta-tags.

The rest is history.

COMING SOON! Details of the next few events for #bolamat50

IMG_6212 IMG_6213

Please come and see my Black Daffodil Press / High Street X stall at the Sheffield Anarchist Book Fair on 12th July at The Workstation, Sheffield S1 2BX. The fair is open to the public 10am – 6pm FREE ENTRY. As well as book stalls, there will be screenings and workshops. #sheffbookfair @sheffbookfair

Screen shot 2014-07-03 at 22.46.51

Access Space 24-hour Digithon 19/20 July at Access Space, Sheffield S1 4RG. This is a 24-hour fundraising event for Access Space, a free, open access media, arts and technology hackspace in Sheffield, UK. Access Space is a charity and is short of funds, so please  come along and bring some cash. #digithonsheffield

I will be presenting something about my forthcoming Casualty 14-18 commemoration of the 16 million people who were killed in the First World War.

Screen shot 2014-06-28 at 17.23.51

Casualty 14-18 is an online, generative artwork that will commemorate all of the 16 million people who were killed in the First World War. The projects starts on 28th July 2014 and will continue until 11th November 2018. There are also proposals for physical exhibitions of the work. Offers invited.

Casualty 14-18 – A commemoration of 16 million dead 

Screen shot 2014-06-28 at 17.23.51

I had the idea for this work in 2001, although it was not specifically about World War 1. However, as the 100th anniversary falls within my Retrospective year, it seems an ideal time to realise the work.

This is a generative work that creates pages of images of human figures with no indication of gender, age, nationality or religion. It creates one figure for each of the 16 million people who died in the First World War. Each page is composed of 340 figures and it will take over 47,000 A4 pages to record them all. I am currently writing software to generate the pages and the representations of the figures will vary. The software will publish an average of 30 pages per day for approximately four years and three months from the first shots being fired on the 28th of July 1914 to Armistice Day on 11th November 1918.


Today is the 100th anniversary of the assassination of Archduke Franz Ferdinand, the act that triggered events that led to the First World War and 16 million casualties. Unlike much of the mainstream coverage that remembers the royalty, generals and civil servants who failed to avert The Great War, my work remembers the dead.