When would you get an ant, a spider, a man o' war, Martin, Halley, Julia, Lorenz, Lyapunov, Newton and the Gingerbread Man all in a frothy basin?
#perl -w use strict; ######################################### # # # bop.pl # # Beauty of Perl # # # # suggested use: # # perl bop.pl 70 20 for a console # # perl bop.pl 1000 1000 for a textfile. # # # ######################################### my ($martin,$manowar,$kamtorus, $hypercomplex,$unity,$ant,$spider)=@ARGV; unless (defined $manowar) {($martin,$manowar)=(70,20)}; unless (defined $ant) {($kamtorus,$ant,$unity,$hypercomplex)=(-2,1.5,1,-1.5)}; $spider=50 unless $spider; my $frothybasin="X.'-;/?71ICDOQ\@M"; for (1..$manowar) { my $halley=$hypercomplex+$_*($ant-$hypercomplex)/$manowar; for (1..$martin) { my $julia=$kamtorus+$_*($unity-$kamtorus)/$martin; my ($lsystem,$lorenz,$lyapunov,$newton,$gingerbreadman)=(' ',$hall +ey,$julia); for (1..$spider) { $newton=$halley+$lyapunov*$lorenz+$lorenz*$lyapunov; $gingerbreadman=$lyapunov*$lyapunov+$julia-$lorenz*$lorenz; ($lorenz,$lyapunov)=($newton,$gingerbreadman); if ($lorenz*$lorenz+$lyapunov*$lyapunov>4) {$lsystem=substr($frothybasin,$_%length($frothybasin)-1,1);} last unless ($lsystem eq ' '); } print $lsystem; } print "\n"; }

Dave

Eight years involved with the nuclear industry have taught me that when nothing can possible go wrong and every avenue has been covered, then is the time to buy a house on the next continent. Terry Pratchett

Replies are listed 'Best First'.
Re: Beauty of Perl
by MeowChow (Vicar) on Mar 28, 2001 at 11:09 UTC
      I'm not entirely sure what to say: either 'great minds think alike' or 'You bastard!'. ;-)

      Nice program, anyway!

      Dave

      Eight years involved with the nuclear industry have taught me that when nothing can possible go wrong and every avenue has been covered, then is the time to buy a house on the next continent. Terry Pratchett

        I wish I could take credit for that node, but alas, it is BooK's node. I hope my link didn't imply authorship =)