Does anyone know of a python library that can interpolate between two lines. For example, given the two solid lines below, I would like to produce the dashed line in the middle. In other words, I'd like to get the centreline. The input is a just two numpy
arrays of coordinates with size N x 2
and M x 2
respectively.
Edit: so the suggested duplicate seems to be a promising way to approach this. However, it assumes that there is an outer and inner curve with respect to a single origin (0,0). I believe this algorithm would fail in examples such as the one below:
Furthermore, I'd like to know if someone has written a function for this in some optimized python library. Although optimization isn't exactly a necessary.