in reply to (Golf) Mandelbrot Fractal
I think the for(a..iv) trick is a nice stroke-shaver.map{$i=$_*.05-1;map{$r=$j=$_*.05-2.3;$z=$i;$b=$";for (a..iv){$m=$r*$r;$n=$z*$z;$b="+",last if$m+$n>4;$z =2*$r*$z+$i;$r=$m-$n+$j}print$b}0..59;print$/}0..39
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: (Golf) Mandelbrot Fractal
by pdcawley (Hermit) on May 08, 2002 at 17:51 UTC | |
| [reply] [d/l] |
by belg4mit (Prior) on May 08, 2002 at 20:45 UTC | |
-- | [reply] [d/l] |
by pdcawley (Hermit) on May 09, 2002 at 08:51 UTC | |
Which wc tells me is 136 chars long (counting 3 for "-l\n" in the same fashion as the perl.golf crowd). Having tried all the shorter solutions I've seen so far in this thread, I've not found one that actually works, but this one does. | [reply] [d/l] |
by belg4mit (Prior) on May 09, 2002 at 12:26 UTC | |
It is afterall a fractal, and therefore only approximated at the horrendous resolution afforded by the dimensions selected. Whilte {NULE} gave a sepecific output to match, "gives a decent presentation of the Mandelbrot fractal" was also said which I believe warrants some artistic license. UPDATE: I did a little comparison between 165213 and the original output; after alignment, cropping and overlaying. The results are below. There are definitely differences; 88+33 out of 2440 to be exact
-- | [reply] [d/l] [select] |
Re: Re: (Golf) Mandelbrot Fractal
by belg4mit (Prior) on May 08, 2002 at 18:06 UTC | |
148 for a tie
Meanwhile, in the chatterbox...
-- | [reply] [d/l] [select] |
by demerphq (Chancellor) on May 08, 2002 at 18:54 UTC | |
UPDATE:Removed single line version cause it screws up some peoples screen layout. Or a little better formatted
Yves / DeMerphq | [reply] [d/l] |
by YuckFoo (Abbot) on May 08, 2002 at 19:11 UTC | |
YuckFoo Update: Thanks belg4mit, changed semi-colon to comma to work in demerphq's code which becomes:
| [reply] [d/l] [select] |
by belg4mit (Prior) on May 08, 2002 at 20:10 UTC |