Finding a smooth path between points on a 2d map with maximum curvature

2018-03-25 22:12:38

I have a set of points on a map (given by x,y coordinates) and I want to find a path between these points. The goal is to have a ship sail this path, so the path can't just be straight lines.

I believe I can calculate the tangent direction or the curve at the given points by looking at the previous and next point, as illustrated below. Since going from point A to B is 100m at an angle of 90° and going from point B to C is 200m at angle 0°, the tangent direction in point B would be $$\frac{100}{100+200} * 90° + \frac{200}{100+200} * 0° = 30°$$

The tangent of the very first point and the very last point would simply be chosen in the direction of the next and previous point respectively. So if there are no other points than A, B and C then the tangent at A would be 90° and the tangent at C would be 0°.

Tangent direction calculation

I'm stuck at what to do next.

Preferably I would get a piecewise spline so that the curve between each pair of points can be calculated indepe