#!/usr/bin/perl
use lib '.';
require "pagelib.pl";
header();
head();

$dir = "images/atat/mini";
if(!opendir(DIR,$dir)) {
    print "Internal error locating images!<br>\n";
}
@files = readdir(DIR);
foreach(@files) { push @images,$1 if(/(mini_at[sa]t_\d+|micro_at[sa]t_\d+)\.jpg/); }
%used = ();

print qq`
<br><br>
<B><font size=+1>Mini Walkers</font></B><br>
<br>
Thanks to a recent challenge, I designed an AT-AT in a 1 meter = 1 stud scale.
Turned out much better than I had hoped, I'm happy to say-- and it
<i>almost</i> matches the scale of Lego's mini AT-ST to boot. I tweaked the
Lego AT-ST to size it a bit more correctly (and give it foot treads). And to
any Lego employees out there with sway over the upcoming product lines:
Gimme some 3x3 radar dishes in plain light grey!`;

show_images('mini_atat_01',
	    'mini_atat_02',
	    'mini_atat_03',
	    'mini_atat_04',
	    'mini_atst_01',
	    );
print qq`<br>
But, shortly after being challenged with this version, I caught
<a href="http://www.brickshelf.com/cgi-bin/gallery.cgi?f=44732">Alex Peacock's Micro AT-AT</a>
(copied here on the left). It gave me an idea for doing a <i>slightly</i>
larger but still micro AT-AT (But I must give credit for the foot idea
to Dan Boger). By the way-- Alex's teeny design is almost perfectly to scale
height-wise with the Lego's ISD!`;
show_images('micro_atat_01');

foot();

sub show_images {
    my(@pics) = @_;
    my($i) = 0;
    print "<table width=100\%><tr>\n";
    foreach(@pics) {
	next if($used{$_});
	$used{$_} = 1;
	if(!($i++%4)) {
	    print "</tr>\n<tr>\n";
	}
	print "<td align=center><a href=\"$dir/$_.jpg\"><img src=\"$dir/$_\_th.jpg\" border=0></a></td>\n";
    }
    print "</tr></table>\n";
}
