This is an extension of the question here because the answer seemed to be specific on the shapes involved, and largely rely on some known knowledge of the shapes (e.g. a line can only intersect a circle at most two points)
Suppose I have two shapes: A circle and a square described by
$$x^2+y^2=r^2$$
and
$$\{(x,y):|x−a|≤s,|y−b|≤s\}$$
What function can allow me to count the number of intersections for some given r,a,b,s?
The answer to this question can help generalise the problem to the case where the two shapes $A$ and $B$ may be abstract and does not live in euclidian space which prevent the use of intuition as in the simpler case above
Because say if we are working in hyperbolic space, we cannot easily draw a hyperbolic circle or square, thus we lost the intuitive way to solve problems of these
– Secret Nov 02 '15 at 06:00