Datasets:

ArXiv:
License:
dp-bench / src /geometry.py
mer9ury
refactor: Sync evaluation pipeline, scripts, and docs from private repo
1e9a6e5
raw
history blame
300 Bytes
from shapely.geometry import Polygon
from shapely import affinity
def is_included(points_0, points_1, soft=0.2):
polygon_0 = Polygon(points_0)
polygon_1 = Polygon(points_1)
polygon_1 = affinity.scale(polygon_1, xfact=1. - soft, yfact=1. - soft)
return polygon_0.contains(polygon_1)