Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: do I win the "most pointless use of ZSH" award? ;)
- X-seq: zsh-users 3844
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: do I win the "most pointless use of ZSH" award? ;)
- Date: Mon, 30 Apr 2001 15:15:53 -0700
- In-reply-to: <20010430210517.A4840@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010427213108.A28356@xxxxxxxxxx> <20010430124125.A2527@xxxxxxxxxxxxxxxxxxx> <20010430210517.A4840@xxxxxxxxxx>
On Apr 30, 9:05pm, Alan Third wrote:
>
> Hi, just for what it's worth, with the help of Bart Schaefer I've
> managed to optimise the code a bit! It also looks a bit more
> interesting whilst it's drawing than before... :)
Just one thing:
> #!/bin/zsh
>
> ((columns=COLUMNS-1, lines=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
>
> for (( p=0.0, q=0.0, i=0 ; p*p+q*q < 4 && i < 32 ; i++));do
> ((pnew=p*p-q*q+a, q=2*p*q+b, p=pnew))
> done
>
> ((colour=(i/4)%8))
>
> echo -n "\\e[4${colour}m "
> done
echo
> done
With that echo inserted, one can do e.g.
COLUMNS=60 LINES=20 zmandel
(or whatever you've called this) to draw the set smaller than the actual
screen size.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author