#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)=(' ',$halley,$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"; }