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

Untitled 3

This time I have added a similar routine to fill from the bottom-right to top-left. The next iteration might be to create a contiguous group in the middle that could have a ragged edge on the top and on the bottom (see below).

Code fragment:

UNITCOUNT=$[RANDOM % 340]

UNITROWS=$[$UNITCOUNT / 20]
UNITCOLUMNS=$[$UNITCOUNT % 20]
echo $”UNITCOUNT = “$UNITCOUNT#” – “$UNITROWS” rows, “$UNITCOLUMNS” columns”

UNITCOL1=”$[RANDOM % 255],$[RANDOM % 255],$[RANDOM % 255]”

# 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
fi
if [ $UNITCOLUMNS -ne 0 ] ; then
convert casualtytiled.png -region $[$UNITCOLUMNS * 20]x38+0+$[$UNITROWS * 38] -fill “rgba($UNITCOL1)” -colorize 30% casualtytiled.png
fi

UNITCOUNT=$[RANDOM % 340]
UNITROWS=$[$UNITCOUNT / 20]
UNITCOLUMNS=$[$UNITCOUNT % 20]
echo $”UNITCOUNT = “$UNITCOUNT#” – “$UNITROWS” rows, “$UNITCOLUMNS” columns”

UNITCOL1=”$[RANDOM % 255],$[RANDOM % 255],$[RANDOM % 255]”

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

Untitled 2

I have started to organise the routines into functions so that I can call them in a more structured way. More soon…

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