Smooth transitioning US tour in the same vein as this example. Steps:
- Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
- Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs
Some possible improvements:
- Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
- Tweaking the placement of added points with simulated annealing
- Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled
- Try reversing the order of points too
States are preprojected to appropriate State Plane projections and don't include islands or multipart states (AK, HI, MI).
See also: Jigsaw morphing
I'm also curious about this possible improvement:
Is there a specific simulated annealing algorithm that could be used here? I assume that you would want to place the points in such a way that minimizes the distance traveled during the morph... but the points are added before the optimal winding is calculated, so I'm not sure how this would be possible.