Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 20 Feb 1998.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
Ehm, some 'thingie' for perl-owners...

Ehm, some 'thingie' for perl-owners...

alt.ascii-art · 1 message · 20 Feb 1998
Ojoshiro <ojo...@neroc.nl> ASCII art 20 Feb 1998 00:00 · raw headers · report
Yeah, well...ehm...
This is best viewed on a terminal with VT100 settings (Archaic, no?)

It oesn't really do anything but draw circles, enfin...
judge for yourself...

perl can be found (for most platforms) @ http://www.perl.com

-- 
  .        .       *    . Ojosh!ro '98|                         
     +  /   .'`-.  .         .        |                         
       /| .'`-.  `-.    .-""""-.   +  |                        
.  *  / !'     `-. /   /   0  . \     |                        
   . /`/`-.     / /   |     ( )  |    |                        
     `/  _ `-.-` /   . \   . o  /     |                        
  ___Z__//   -  /\_____/`-.__.-'  . * |                        
 /     //   -  /      /            .  |                        
 ~-._ //   -.-`-./`-,/  .  +          |                        
+  / ~ `-.-'/    `-./         *       |                        
  '   '/   /   .      *   .         * |                         
--------------------------------------+-------------------------
                                      | The universe is just big
                                      | enough to contain all we
                                      | can imagine to be in it.
                                      | mailto:ojoshiro


#!/usr/bin/perl
require "AText.pm";
my @golden = ( 1,2,3,5,8,13,21,34,55,89,144,233 );
my ( $y , $x ) = ( 23 , 78 );
$x /= 2;
sub circle
{	my $straal = shift;
	my $t;
	for ( $t = 0.0 ; $t <= 2*3.1415 ; $t += .0333 )
	{	$field[ int( sin($t)*$straal+$y ) ][ int( cos($t)*(1.4*$straal)+$x )] = 1;
	}
	return;

}	

sub horline
{	my $height = shift;
	for ( 0..$x*2 )
	{	$field[ int($height) ][ int($_)] = 1;
	}
	return;
}

	my $field = [[]];
my $dir = -1;
my $k =  8;
while ( $k != -1 )
{	print Key( 'home');
	$k += $dir;
	for ( $t = 0.0 ; $t <= 3.1415*.5 ; $t += 3.1415/$golden[$k] )
	{	circle( cos( $t )*$y );
	}
	my $line = "";
	for ( $t = 0 ; $t <= $y*2 ; $t += 2 )
	{	for ( $u = 0 ; $u <= $x*2 ; $u++ )
		{	if ( !$field[$t][$u] && !$field[$t+1][$u] )
			{	$line .= " ";
			} elsif ( !$field[$t][$u] && $field[$t+1][$u] )
			{	$line .= "o";
			} elsif ( $field[$t][$u] && !$field[$t+1][$u] )
			{	$line .= "\"";
			} elsif ( $field[$t][$u] && $field[$t+1][$u] )
			{	$line .= "8";
			}
			$field[$t][$u] = 0;
			$field[$t+1][$u] = 0;
		}	
		$line .= "\n";
	}
	print $line."";	
	if ($k<1||$k>9)
	{ $dir = -$dir;
	}

}	


About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 1998 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post