in reply to (Golf) Mandelbrot Fractal
map{$i=$_/20-1;map{$r=$j=$_/20-2.3;$z=$i;($m=$r*$r,$n=$z*$z,$z=2*$r*$z+$i,$r=$m-$n+$j)for a..z;print$m<4?$":"+"}0..59;print$/}0..39Update: With a bit of hackery then at 130:
map{$i=$_/20-1;map{$r=$j=$_/20-2.3;$z=$i;($n=$z*$z,$z=2*$r*$z+$i,$r=($m=$r*$r)-$n+$j)for a..z;print$m<4?$":"+"}0..59;print$/}0..39As a note, using 'X' instead of '+' would save 2 characters.
print map{$i=$_/20-1;$/,map{$r=$j=$_/20-2.3;$z=$i;($n=$z*$z,$z=2*$r*$z+$i,$r=($m=$r*$r)-$n+$j)for a..z;$m<4?$":"+"}0..59}0..39
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (Golf) Mandelbrot Fractal
by educated_foo (Vicar) on May 08, 2002 at 21:48 UTC | |
by belg4mit (Prior) on May 08, 2002 at 23:27 UTC | |
by hagus (Monk) on May 09, 2002 at 00:01 UTC | |
by educated_foo (Vicar) on May 09, 2002 at 00:34 UTC | |
by tadman (Prior) on May 09, 2002 at 00:51 UTC | |
by pdcawley (Hermit) on May 09, 2002 at 06:45 UTC | |
by tadman (Prior) on May 09, 2002 at 08:03 UTC |