Interpolating a line between two other lines in python

Does anyone know a python library that can interpolate between two lines. For example, given the two solid lines below, I would like to create a dashed line in the middle. In other words, I would like to get the center line. The input is only two arrays of numpycoordinates with size N x 2and, M x 2respectively.

enter image description here

Edit : so the proposed duplicate seems like a promising way to get closer to this. However, he assumes that there is an external and internal curve relative to a single beginning (0,0). I believe this algorithm will fail in examples like the ones below:

enter image description here

, , - python. .

+3

Source: https://habr.com/ru/post/1694261/


All Articles