---
name: "Math::Polygon::Convex"
section: "3pm"
platform: "linux"
package: "libmath-polygon-perl"
version: "1.11-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Math::Polygon::Convex"
---

# Math::Polygon::Convex(3pm)

Collection of convex algorithms

## NAME

Math::Polygon::Convex - Collection of convex algorithms

## INHERITANCE

```
 Math::Polygon::Convex
   is an Exporter
```

## SYNOPSIS

```
 use Math::Polygon::Convex  qw/chainHull_2D/;
 my @points = ( [1,2], [2,4], [5,7], [1,2] );
 my $poly   = chainHull_2D @points;
```

## DESCRIPTION

The "convex polygon" around a set of points, is the polygon with a minimal size which contains all points.

This package contains one convex calculation algorithm, but may be extended with alternative implementations in the future.

## FUNCTIONS

- **chainHull\_2D**(@points)

  Each POINT is an ARRAY of two elements: the X and Y coordinate of a point. Returned is the enclosing convex Math::Polygon object.

  Algorithm by Dan Sunday, *http://geometryalgorithms.com/Archive/algorithm\_0109/algorithm\_0109.htm*

## SEE ALSO

This module is part of Math-Polygon distribution version 1.11, built on May 02, 2025. Website: *http://perl.overmeer.net/CPAN/*

## LICENSE

Copyrights 2004-2025 by \[Mark Overmeer \<markov@cpan.org\>\]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See *http://dev.perl.org/licenses/*
