From 67c71d683df48e4343d2a26277c18202257eb4aa Mon Sep 17 00:00:00 2001 From: mmattmcw Date: Tue, 10 Aug 2021 18:07:26 -0400 Subject: [PATCH] Script that stipples rendered frames in a loop --- stipple.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 stipple.sh diff --git a/stipple.sh b/stipple.sh new file mode 100644 index 0000000..ab63943 --- /dev/null +++ b/stipple.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +INPUT=`realpath "${1}"` +OUTPUT=`realpath "${2}"` + +WIDTH=404 +HEIGHT=374 +DOTSIZE=4 +MAXGENERATIONS=25 +MAXPARTICLES=500 +MINDOTSIZE=0.8 +LINE=0.8 +FILL=true + +#files in dir +for png in "${INPUT}/"*.png ; do + filename=`basename "${png}"` + name=`echo "${filename}" | cut -d'.' -f1` + num=`echo "${name}" | awk -F'_' '{print $(NF)}'` + tmp=`mktemp`.png + bash white.sh "${png}" "${tmp}" + cd ~/src/stipple_gen/ + bash stipple_gen.sh \ + --inputImage "${tmp}" \ + --outputImage "${OUTPUT}/${name}_rendered.png" \ + --outputSVG "${OUTPUT}/${name}.svg" \ + --canvasWidth $WIDTH \ + --canvasHeight $HEIGHT \ + --dotSizeFactor $DOTSIZE \ + --windowWidth $WIDTH \ + --windowHeight $HEIGHT \ + --maxGenerations $MAXGENERATIONS \ + --minDotSize $MINDOTSIZE \ + --line $LINE \ + --fill $FILL \ + --maxParticles $MAXPARTICLES + rm "${tmp}" + cd ~/src/animation/ +done \ No newline at end of file