zsh-users
 help / color / mirror / code / Atom feed
* do I win the "most pointless use of ZSH" award? ;)
@ 2001-04-27 20:31 Alan Third
  2001-04-27 20:52 ` Clint Adams
  2001-04-30 19:41 ` David Terrell
  0 siblings, 2 replies; 11+ messages in thread
From: Alan Third @ 2001-04-27 20:31 UTC (permalink / raw)
  To: zsh-users

#!/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!


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-05-02 22:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-27 20:31 do I win the "most pointless use of ZSH" award? ;) Alan Third
2001-04-27 20:52 ` Clint Adams
2001-04-30 19:41 ` David Terrell
2001-04-30 20:05   ` Alan Third
2001-04-30 20:23     ` Geoff Raye
2001-04-30 20:38       ` Alan Third
2001-04-30 22:19       ` Bart Schaefer
2001-04-30 22:15     ` Bart Schaefer
2001-05-02 17:30       ` Alan Third
2001-05-02 22:26       ` Bruce Stephens
2001-05-02 22:56         ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).