zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: do I win the "most pointless use of ZSH" award? ;)
Date: Mon, 30 Apr 2001 15:15:53 -0700	[thread overview]
Message-ID: <010430151553.ZM9588@candle.brasslantern.com> (raw)
In-Reply-To: <20010430210517.A4840@idiocy.org>

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.


  parent reply	other threads:[~2001-04-30 22:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-27 20:31 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 [this message]
2001-05-02 17:30       ` Alan Third
2001-05-02 22:26       ` Bruce Stephens
2001-05-02 22:56         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010430151553.ZM9588@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).