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

Screen shot 2014-10-21 at 11.35.19

My project started on the 28th June 2014 and Armistice Day of the same year will be 107 days into it out of 1,568 in total. That’s 1,091,400 lives lost so far (as a daily average) and there is still more than four years to go.

I have started to organise the Bash script a bit more by separating some of it into functions that can be passed parameters and called in a proper structured manner. The code is still very dirty and will probably remain so for while as I experiment with other variations.

This function is used to either colourise or remove a few individual figures from the blocks.

function UNITSTAMP {
#add/remove some individual figures

echo $MAXCOUNT
for e in $( gseq $MAXCOUNT )
do
echo $e”/”$MAXCOUNT
convert casualtytiled.png  -region 20×38+$[($[RANDOM % 20]) * 20]+$[($[RANDOM % 17]) * 38] -fill  “rgba($UNITSTAMPCOL)” -colorize $COLORIZ$
convert casualtytiled.png -transparent white casualtytiled.png
done
}

It’s hardly a huge program but what has become very apparent about Bash is how irregular the syntax is. I guess this is a product of open source development, the commands and structures do not comply to a reliably reproducible structure, and this is where other programming regimes such as Python really come into their own.

On the plus side, it is very convenient to be able to call a load of add-on commands and functions, as and when I need them.

However, in the future I might rewrite the software to use something more structured, such as PHP or Python, if they can do the graphic manipulations.

Screen shot 2014-10-21 at 11.45.15

To my eye, this has too many blanks.

Screen shot 2014-10-21 at 11.47.26

This is much more satisfying.

The blanks seem to work best when they are only occasional and only one or a small number on the same page. Here is the call from the main program loop.

#remove a few figures
if [ $[RANDOM % 10] -eq 0 ] ; then
MAXCOUNT=$[RANDOM % 5]
UNITSTAMPCOL=”255,255,255″
COLORIZE3=’100%’
echo ‘COLORIZE3 = ‘$COLORIZE3
UNITSTAMP
fi

I included this because it adds an element of mystery about the individuality of the highlighted or removed figures. A friend asked me what the blanks mean. My reply was – exactly, what do the blanks mean?

http://casualty1418.net

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s