Math::Polygon::Tree creates a B-tree of polygon parts for fast check if object is inside this polygon. This method is effective if polygon has hundreds or more segments. WWW: https://metacpan.org/release/Math-Polygon-Tree