From 952c371218fd5dc2173e17106399f39eadf94159 Mon Sep 17 00:00:00 2001 From: Stephan Barth Date: Mon, 25 Dec 2023 12:01:17 +0100 Subject: [PATCH] Polygon library started. --- Manticore/Geometry/Polygon.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Manticore/Geometry/Polygon.pm diff --git a/Manticore/Geometry/Polygon.pm b/Manticore/Geometry/Polygon.pm new file mode 100644 index 0000000..440fa6b --- /dev/null +++ b/Manticore/Geometry/Polygon.pm @@ -0,0 +1,17 @@ +package Manticore::Geometry::Polygon; + +use strict; +use warnings; + +# Data representation: +# List of {p=>polygon, v=>value} +# Each of these polygons shall be normalized, hence intersection free with itself +# Value is summarized if several polygons are around the same point +# Polygons are a list of points +sub new { + my ($pkg, $pts) = @_; + return bless $pts; +} + + +1;