back to index | | home .

pool like movement


webm https://gfycat.com/AnxiousSardonicIndianrockpython
E1.jpg https://i.imgur.com/SFxqrjo.jpg
e-mask.jpg https://i.imgur.com/UZ7iH4Z.jpg
This is an linux bash script!! Tested on MX linux.
Script output images to current folder, where script placed. The image variables are hardcoded.

Usage: ./foo [1|2|3|z|b|a] 1 = eyerand, random noise generate 2 = eyejpg, use sine function to output loop-able frames. r-$i.jpg" ref: imagemagick random ripple 3 = eyegif, apply mask and displace images to make gif. r2-$i.jpg d-$i.jpg d.gif 12 or z = eyerand;eyejpg 23 or b = eyejpg;eyegif a or 123 = eyerand;eyejpg;eyegif Using mask or not under eyegif(). In for-loop, un-comment the first and comment out the two line follows before the done; Change noise image size under eyerand(), convert -size 540x360 increase total frames from "for i in `seq 0 30 359`; do" to "0 30 500" 16 frames. 359/30 = 11, 500/30 = 16 Remember to change for-loop end number in eyegif too, {0..16}

Edit to change wave behavior:


#!/bin/bash  
eyegif() {  
# using mask or not  
# composite ../E1.jpg r-2.jpg +swap -displace -2x3 d.jpg  
for i in {0..11};do  
#composite ../E1.jpg r-$i.jpg +swap -displace -13x1 d-$i.jpg #no mask applied  
convert ../e-mask.jpg r-$i.jpg -compose multiply -composite -blur 1x2 r2-$i.jpg  
composite ../E1.jpg r2-$i.jpg +swap -displace -7x5 d-$i.jpg  
done  
ls d*jpg|sort -s -t- -k2,2n > dlist  
convert -delay 20 @dlist d.gif;mpv d.gif  
#ffmpeg -i d.gif -r 12 d.mp4  
exit  
}  

eyerand(){  
convert -size 540x360 xc:   +noise Random   random.png  
convert random.png -virtual-pixel tile  -blur 0x10 -auto-level random_10.png  
convert random_10.png  -channel G  -separate   random_10_gray.png  
#convert random_10_gray.png  -function Sinusoid 1,90   ripples_1.png  
}  

eyejpg(){  
for i in `seq 0 30 359`; do  
#    convert random_10_gray.png -function Sinusoid 3.5,${i} miff:-  
# -channel R -sigmoidal-contrast 10,50% -level 55%  
    convert random_10_gray.png -function Sinusoid 10.5,${i} miff:-  
  done |  
#    convert miff:- -set delay 15 -loop 0 ripples_anim.gif  
#    convert miff:- -radial-blur 90 r.jpg  
#    convert miff:- -swirl 180 -blur 0x5 r.jpg  
#   convert miff:- -blur 0x5 -swirl 80 -flip r.jpg  
convert miff:- -radial-blur 10 -blur 2x5 -colorspace gray r.jpg  

}  

### exec start here  
[[ -z "$1" ]] && exit  
[[ "$1" -eq '1' ]] && eyerand  
[[ "$1" -eq '2' ]] && eyejpg  
[[ "$1" -eq '3' ]] && eyegif  
case "$1" in  
12|z)  
    eyerand;eyejpg ;;  
23|b)  
    eyejpg;eyegif ;;  
a|123)  
    eyerand;eyejpg;eyegif  ;;  
*)  
    exit  
    ;;  
esac  

exit  

2019-2020 MAY https://pastebin.com/0iFTRG79