Math::...:Convex(3pm)
π Math::...:Convex(3pm) π
okay bestie, welcome to the manual page for this lil Perl module β the header up top says Math::...:Convex(3pm) (yes it's abbreviated like that, the terminal did a little truncation slay) and ngl the whole thing is short and sweet. let's get into it π«Ά
β¨ NAME β¨
Math::Polygon::Convex β a whole collection of convex algorithms. that's the whole name, that's the whole vibe π
π¦ INHERITANCE π¦
Math::Polygon::Convex
is an Exporter
so it's an Exporter, which means it can yeet its functions into your namespace when you ask nicely. iconic behavior β¨
πΈ SYNOPSIS πΈ
here's the whole thing in action, fr fr:
use Math::Polygon::Convex qw/chainHull_2D/;
my @points = ( [1,2], [2,4], [5,7], [1,2] );
my $poly = chainHull_2D @points;
look at that. import the one function, hand it some points, get a polygon back. main character energy π
π DESCRIPTION π
okay so the "convex polygon" around a set of points is literally the polygon with the minimal size that still contains all of the points. like the tightest lil blanket you can wrap around a pile of dots π
This package contains one convex calculation algorithm, but may be extended with alternative implementations in the future. so rn it's a party of one, but the door's open πͺβ¨
π₯ 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 β credit where credit is due bestie: <https://geometryalgorithms.com/Archive/algorithm_0109/algorithm_0109.htm>
π SEE ALSO π
This module is part of Math-Polygon version 2.00, built on September 04, 2025. Website: http://perl.overmeer.net/CPAN/ π
π LICENSE π
For contributors see file ChangeLog.
This software is copyright (c) 2004-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, be cool, share it, remix it, it's free free π«Ά
okay that's the whole page!! π and for the cute sign-off: this was rendered by perl v5.40.1, dated 2025-10-04, filed under Math::...:Convex(3pm) β and that's on periodt π
β¨πΈ
π¦ where this page comes from
- ubuntu resolute: libmath-polygon-perl 2.00-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmath-polygon-perl 2.00-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms