#!/usr/bin/perl -w

use Math::MatrixReal;
$, = "\n";

# Create the triangle.
@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"));

# Move it up and to the right.
foreach (@triangle) { $_->add_scalar($_, 2) }

# Display the new points.
print @triangle;
