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

Screen shot 2014-07-29 at 10.27.08

For this version, I have only added the colourisation of regions of figures. It’s rather subtle at the moment and I will probably let it run like this for a few days at least. I have to keep reminding myself that this project will run for more than four years, so there’ no rush, although I need to keep an eye on it.

Here is the code:

#!/bin/bash
#casualty make script v3

for i in {1..30}
do

#pad figure
convert casualty.png -gravity center -extent 20×38 casualtypad.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
for r in {1..3}
do
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
done

#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 ~ 29/07/14 – ‘$(printf %02d $i) Casualtylabel.png

#composite page & label
convert casualtypage.png -page +0+760 casualtylabel.png -layers flatten ‘Casualty1418-14_07_29-‘$(printf %02d $i).png

done

For the first two days I have created the blog posts manually, but it will be automated with a series of additional steps, although I am approaching it cautiously and will be testing the batch automation gradually in an attempt to avoid any huge cock-ups.

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