Old vs. new proposed North Carolina congressional districts, data via WRAL.
Polygons were pre-processed for gentler animation as follows:
- For each district, find the difference n in the number of vertices between the old and new district.
- Add n vertices to whichever one has fewer, evenly spaced along the existing polyline, so the old and new shape each have the same number of vertices (not great for performance).
- For each pair of old/new district, wind the old district around to minimize the sum of the squared distances between point index i in the old district and point index i in the new district.