{"library":"polygon3","title":"Polygon3","description":"A Python 3 library for handling polygonal shapes in 2D, including intersection, union, and clipping operations. Current version 3.0.9.1, with maintenance updates as needed.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install polygon3"],"cli":null},"imports":["from polygon import Polygon"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from polygon import Polygon\n\n# Create two polygons\npoly1 = Polygon([(0,0), (1,0), (1,1), (0,1)])\npoly2 = Polygon([(0.5,0.5), (1.5,0.5), (1.5,1.5), (0.5,1.5)])\n\n# Compute intersection\nintersection = poly1 & poly2\nprint(f\"Intersection area: {intersection.area()}\")\n\n# Compute union\nunion = poly1 | poly2\nprint(f\"Union area: {union.area()}\")","lang":"python","description":"Create two polygons, compute their intersection and union.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}