#!/usr/bin/perl

print 'load "header"
set term png
';

$th0 = 30;
$ph0 = -15;
$th1 = 100;
$ph1 = 70;
$thstep = 4;
$phstep = 6;
$count = 30;

for($i=0; $i<$count; $i++){
	print "set view " . ($th0 + ($th1-$th0)*$i/$count) . "," . (($ph0 + ($ph1-$ph0)*$i/$count + 360) % 360) . "\n";
	print sprintf("set output \"%02d.png\"\n", $i);
	print 'splot "data2" title "sample", "frame" title "frame" with lines 7
';
}
