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.

The aesthetic algorithm
24. March 2009
#!/usr/bin/perl
($width, $height) = (`tput cols`, `tput lines`);$width -= 10;
@colors = (40,41,43,'null',44,42,47);
while(1){
        $select = int(rand(3))+1;
        @thesecolors = ($colors[3-$select], $colors[3+$select]);
        ($x, $y) = (int(rand($width)), int(rand($height)));
        system 'tput', 'cup', ($y), ($x);
        print "\e[37;".$thesecolors[0]."m          \e[0m";
        system 'tput', 'cup', $height-$y, $width-$x;
        print "\e[37;".$thesecolors[1]."m          \e[0m";
}

back to Microcodes