The trapezoid’s vertices gradually reduce in shape one at a time, and I’d like to find out if any of the edges of the trapezoid ever cross the boundary of the oval.

My final aim is to prevent the trapezoid’s edges from ever touching the oval’s boundaries. I have tried using overlaps(polygon) but it always returns TRUE because one of the polygons is inside the other. Does anyone know if there’s a similar function that only accounts for the edges of the polygon?

There’s no existing function but I can think of a way of using overlap to do this: Remake your trapezoid as four independent visual.Line objects. Since you’re deforming the trapezoid, your shape is probably already a set of four vertices that are being updated, so you just need to make those vertices the start- and end-points of four different lines instead of a single object. Then you can check if any of the line objects overlap with the circle and it won’t take into account the interior space between them.

“ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 120 and the array at index 1 has size 129”