Debian Codegraph @

lib/Math/Polygon/Convex.pod

raw
1 =encoding utf8
2
3 =head1 NAME
4
5 Math::Polygon::Convex - Collection of convex algorithms
6
7 =head1 INHERITANCE
8
9 Math::Polygon::Convex
10 is an Exporter
11
12 =head1 SYNOPSIS
13
14 use Math::Polygon::Convex qw/chainHull_2D/;
15
16 my @points = ( [1,2], [2,4], [5,7], [1,2] );
17 my $poly = chainHull_2D @points;
18
19 =head1 DESCRIPTION
20
21 The "convex polygon" around a set of points, is the polygon with a minimal
22 size which contains all points.
23
24 This package contains one convex calculation algorithm, but may be extended
25 with alternative implementations in the future.
26
27 =head1 FUNCTIONS
28
29 =over 4
30
31 =item B<chainHull_2D>(@points)
32
33 Each POINT is an ARRAY of two elements: the X and Y coordinate of a point.
34 Returned is the enclosing convex L<Math::Polygon|Math::Polygon> object.
35
36 Algorithm by Dan Sunday,
37 L<https://geometryalgorithms.com/Archive/algorithm_0109/algorithm_0109.htm>
38
39 =back
40
41 =head1 SEE ALSO
42
43 This module is part of Math-Polygon version 2.00,
44 built on September 04, 2025. Website: F<http://perl.overmeer.net/CPAN/>
45
46 =head1 LICENSE
47
48 For contributors see file ChangeLog.
49
50 This software is copyright (c) 2004-2025 by Mark Overmeer.
51
52 This is free software; you can redistribute it and/or modify it under
53 the same terms as the Perl 5 programming language system itself.
54