SPLIT TWEAK CURVE SMOOTHING ALGORITHM

Given an utterly crude curve : A,B,C (in this example we're using an open curve but this works just fine on a closed curve too)

Given the 2 segs (A,B and B,C) get the center points : D,E

Draw a seg connecting D and E. Get the center point of that : F

Draw a seg connecting F and B. Get the center of that : G

Move B to G. Thus we have incrementally smoothed our curve

Repeat this process a few times for all points on the curve to increase smoothness

And so on...

As I said this also works for closed curves.

Here's the relevant Java code :

https://github.com/johnalexandergreene/Geom_2D/blob/master/CurveSmoother_Open.java

https://github.com/johnalexandergreene/Geom_2D/blob/master/CurveSmoother_Closed.java