Math::Polygon::Calc - Simple polygon calculations
Math::Polygon::Calc is a Exporter
my @poly = ( [1,2], [2,4], [5,7], [1, 2] ); my ($xmin, $ymin, $xmax, $ymax) = polygon_bbox @poly; my $area = polygon_area @poly; MY $L = polygon_perimeter @poly; if(polygon_is_clockwise @poly) { ... }; my @rot = polygon_start_minxy @poly;
This package contains a wide variaty of relatively easy polygon calculations. More complex calculations are put in separate packages.
See the Math::Polygon website at http://perl.overmeer.net/geo for more details.
Module version 0.003. Written by Mark Overmeer (polygon@overmeer.net). See the ChangeLog for other contributors.
Copyright (c) 2004 by the author(s). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Math::Polygon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Polygon
CPAN shell
perl -MCPAN -e shell install Math::Polygon
For more information on module installation, please visit the detailed CPAN module installation guide.