summaryrefslogtreecommitdiffstats
path: root/test/source/mktile0.pl
blob: b932ed0c9a26ac229b613a9b18563796afe4dd46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$L = 64 ;
print "P3 $L $L 255\n" ;
for $y ( 0 .. $L-1 ) {
    for $x ( 0 .. $L-1 ) {
        $m = int($y / 4)*16 + int($x/4) ;
        if( $m < 216 ) {
            print( 51 * ($m % 6), " ",
                   51 * (int($m/6) % 6), " ",
                   51 * (int($m/36)), "\n" );
        } else {
            $m = ($m-216) * 6 + 10 ;
            print( "$m $m $m\n" );
        }
    }
}