I'm doing a little assignment, as title suggest it's about numerical analysis of contact function, more specifically i'm looking for the closest distance between two points that are inside two different shapes so that those shapes are making contact (they're tangent).
I know its not 100% accurate.
I'm wondering how i can represent different shapes in the best, most uniform way for this algorithm to work at all. Shapes being mostly convex and concave polygons and/or different kinds of curves.
My main idea was to use some kind of spline: B-spline, or NURB, then i could interpolate it and create a polygon.
Then there's a problem with collision detection, for convex sets i'm using Separating Axis Theorem, but what to do with concave polygons and curves, i have no idea.
I'm writing this with C++17 and SFML2, no other third-party libs (for now, if there are any that will help me please link them in your comment).