#!/usr/bin/env zsh nbcore=4 # arguments are: # width nb pixels # height nb pixels # nb of iterations # x position # y position # with of the window # \rm -f mandel.png && ./mandelbrot 500 200 256 -1.351 0.06 0.0005 mandel.png dir=stillimages [[ ! -e $dir ]] && mkdir $dir old=( $dir/*(.N) ) (( $#old > 0 )) && { print -- "cleaning..." \rm -f $dir/*(.) } # posx=-1.2535555 # posy=0.3845245 posx=-1.7685736563152709932817429153295447129341200534055498823375111352827765533646353820119779335363321986478087958745766432300344486098206084588445291690832853792608335811319613234806674959498380432536269122404488847453646628324959064543 posy=-0.0009642968513582800001762427203738194482747761226565635652857831533070475543666558930286153827950716700828887932578932976924523447497708248894734256480183898683164582055541842171815899305250842692638349057118793296768325124255746563 liste=() i=1 width=8.0 imgheight=720 imgwidth=$((imgheight*16/10)) while ((width>0.0000000000001)); do fic=$(printf "$dir/m-%04d.png" $i) \rm -f $fic PREPARAMS="$imgwidth $imgheight 1000 $posx $posy $width $fic" print ./mandelbrot $PREPARAMS eval ./mandelbrot +RTS -N$nbcore -RTS $PREPARAMS (($?>0)) && exit 0 liste=( $liste $fic ) (( width *= 0.97 )) ((i++)) done cmd=avconv which $cmd >/dev/null || cmd=ffmpeg framerate=24 quality=8 \rm -f animandel.mpeg && \ $cmd -f image2 -i "$dir/m-%04d.png" -r $framerate -qscale $quality -s ${imgwidth}x${imgheight} animandel.mp4 # convert -delay 10 -loop 0 $liste animandel.gif