for csp in Lab Luv YCC do convert -size 800x800 gradient:yellow-blue \ \( gradient:black-lime -rotate -90 \) \ -compose CopyGreen -composite -negate -posterize 6 0115_${csp}_00.jpg for i j in `seq -w 0 10 | sed p | sed 1d | tac | sed 1d | tac` do echo $i convert 0115_${csp}_${i}.jpg \ \( +clone -flip \( +clone -colorspace xyZ -separate -colorspace YCC -threshold \ 50% -swap 1,2 -combine -rotate $(( j * 1 )) \ \) -compose Displace -composite \) \ -colorspace $csp -compose Displace -composite -negate -flop 0115_${csp}_${j}.jpg done done