From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12318 invoked from network); 30 Apr 2001 22:17:47 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Apr 2001 22:17:47 -0000 Received: (qmail 827 invoked by alias); 30 Apr 2001 22:17:35 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3844 Received: (qmail 814 invoked from network); 30 Apr 2001 22:17:34 -0000 From: "Bart Schaefer" Message-Id: <010430151553.ZM9588@candle.brasslantern.com> Date: Mon, 30 Apr 2001 15:15:53 -0700 In-Reply-To: <20010430210517.A4840@idiocy.org> Comments: In reply to Alan Third "Re: do I win the "most pointless use of ZSH" award? ;)" (Apr 30, 9:05pm) References: <20010427213108.A28356@idiocy.org> <20010430124125.A2527@pianosa.catch22.org> <20010430210517.A4840@idiocy.org> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: do I win the "most pointless use of ZSH" award? ;) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.