If you have TriD installed with your PDL then you can use that to display the 
result rather than prints:

use PDL;
use PDL::NiceSlice;
use PDL::Graphics::TriD;

$a = zeroes(40,41);
$a(1:3,1:3) .= pdl ( [1,1,1], [0,0,1], [0,1,0] );
while (1) {
   $n = ($a->range(ndcoords($a)-1,3,3)->reorder(2,3,0,1)->sumover->sumover)-$a;
   # $n = $a->range( ndcoords(3,3)->clump(1,2)-1, [ $a->dims ], 'p')->sumover - 
$a;
   $a = ((($n == 2) + ($n == 3))* $a) + (($n==3) * !$a);
   nokeeptwiddling3d();
   imagrgb [$a];
}
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to