#!/usr/bin/perl -w

use Math::MatrixReal;

@triangle = (Math::MatrixReal->new_from_string("[ -1 ]\n[ -1 ]\n"),
             Math::MatrixReal->new_from_string("[  0 ]\n[  1 ]\n"),
             Math::MatrixReal->new_from_string("[  1 ]\n[ -1 ]\n"));

$scale = Math::MatrixReal->new_from_string("[ 2 0 ]\n[ 0 3 ]\n");

# Scale the triangle, doubling the width and tripling the height

foreach (@triangle) { $_ = $scale * $_ }

print @triangle;
