#!/usr/local/bin/perl

for ($a = 0.0, $i = 0; $a < 360; $a += 5, $i++)
{
    $fname = sprintf("out%03d", $i);
    $fname2 = sprintf("out%03d000.rgb", $i);
    $fname3 = sprintf("out%03d.gif", $i);
    `xyz2rgb -o $fname -distance 50 -hsize 200 -vsize 150 -longitude $a 1crn.xyz`;
    `convert -size 200x150 -interpolate line $fname2 $fname3`;
    `rm $fname2`;
}
