def for segment and polygons