zsh-users
 help / color / mirror / code / Atom feed
* Just for fun
@ 2008-10-16 15:05 Bart Schaefer
  2008-10-16 16:24 ` Stephane Chazelas
  2008-10-16 16:56 ` Peter Stephenson
  0 siblings, 2 replies; 6+ messages in thread
From: Bart Schaefer @ 2008-10-16 15:05 UTC (permalink / raw)
  To: zsh-users

A long time ago Alan Third posted the following function to zsh-users.
Anyone want to have a stab at updating it to use the new prompt coloring
code for better accuracy?

function most_useless_use_of_zsh {
    local lines columns colour a b p q i pnew
    ((columns=COLUMNS-1, lines=LINES-1, 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
}

-- 


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

end of thread, other threads:[~2008-12-05 13:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 15:05 Just for fun Bart Schaefer
2008-10-16 16:24 ` Stephane Chazelas
2008-10-16 16:56 ` Peter Stephenson
2008-10-16 19:57   ` Richard Hartmann
2008-10-17  1:21     ` Bart Schaefer
2008-12-05 13:57       ` zzapper

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).