Microcodes
by Pall Thayer
Microcodes are very small code-based artworks. Each one is a fully contained work of art. On this page you can see contributed modifications of the original Microcodes that can be seen here.

Original code:

Enter your name (will be displayed):

Here you can enter extra info, such as warnings if the code can cause damage:

Enter code (must be complete and runnable):

No modified codes have been submitted for this Microcode.

An Icelandic landscape
14. March 2009
#!/usr/bin/perl
use LWP::Simple;
@data = get("http://www.google.com/ig/api?weather=Reykjavik") =~ /(\d+)/g;
@char = ('*','.','#');
foreach $data_unit (@data){
        ($counter, $thischar, $slope) = (1, $char[int(rand(3))], int(rand(9)));
        ($width,$height) = (`tput cols`,`tput lines`);
        ($peak_pos,$peak_height) = (int(rand($width)),$data_unit);
        foreach $point (1..$height){
                if($point>$peak_height){
                        last if int($width-$peak_pos-int($counter/2))<0;
                        system 'tput','cup',$point,int($width-$peak_pos-int($counter/2));
                        print "$thischar"x$counter;$counter = $counter+$slope;
                }
        }
}

back to Microcodes