How to draw a smooth simple line connecting a set of points?

907 Views Asked by At

Apologies in advance for the drawings, they are a bit wobbly.

Suppose you have two unique points in $R^2$. A straight line segment can be drawn between them. Say this line has the property "simple smooth".

Now, suppose you have three points, with a fixed start and end. A curve can be drawn through them, such that the curve is not squiggly, and the curve is continuous. Say this curve is also "simple smooth"

Simple Smooth 3-point curve

To contrast, two straight lines connecting the points are not "simple smooth", because there is a sharp corner. Neither is two straight lines connected by a curved elbow, because this isn't as smooth as the first curve, since the curvature changes too drastically. Neither is a squiggly line, as seen in the picture, because it curves multiple ways.

2 Lines

Curved Elbow

Squiggly Line

Consider if you have 5 points, where the start and end are the same, as shown below. You could draw an ellipse in this case, which would be considered "simple smooth".

Ellipse, pretend it looks more round and less potato like.

Of course, some cases require "squiggles". Consider the set of 4 points below, with a fixed start and end point. In this example, an approximately sinusoidal curve would be considered "simple smooth", because there is no other curve to connect the 4 points that changes curvature less than that while being continuous.

Sinusoid

Now for the general problem statement:

Suppose you have a set of 2 or more points in $R^2$. One point is the start point, and the other is the end point. The start and end can be the same, all other points are unique. You must find a curve that is the most "simple smooth" that starts at the start and ends at the end point, passing through all other points at least once in any order.

Since it is difficult to express a general curve with this behaviour, the problem can be reduced to a simpler one: What is the expression for a quantity that represents the "simple smoothness" of a 2d curve?

My investigations so far:

Curvature seems promising, but I'm stuck on how to use this for quantifying simple smoothness, and also how to use it to minimize inflections.

Convexity and inflections were my first thought, but I don't know how to generalize that to be rotation-invariant in 2D (must treat x and y as interchangeable with no preferred direction or up and down)

Interpolation algorithms aren't good at dealing with non-function curves like circles, as far as I know. They also can change curvature or inflection quite drastically at times, creating "squiggly" lines.

Thanks for any help or ideas!