Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

do I win the "most pointless use of ZSH" award? ;)



#!/bin/zsh

tput clear
echo "Working"

((columns=`tput cols`-1, lines=`tput lines`))
((colour=0))

for ((b=-1.5;b<=1.5;b+=3.0/lines));do
    for ((a=-2.0;a<=1;a+=3.0/columns));do

	((p=0.0, q=0.0, i=0))
	while [[ $((p*p+q*q)) -lt 4 && $i -lt 32 ]];do
	    ((pnew=p*p-q*q+a, qnew=2*p*q+b, p=pnew, q=qnew, i++))
	done

	((colour=i/4))
	if [[ $colour -eq 8 ]];then
	    ((colour=0))
	fi

	output="${output}\\e[4${colour}m "
    done
    output="$output\n"
done
echo $output

#end

-- 
Alan Third

Cows go moo!



Messages sorted by: Reverse Date, Date, Thread, Author