Hacker News new | ask | show | jobs
Interpolating Polygons (2017) (lambdafunk.com)
21 points by mcovalt 1067 days ago
1 comments

FTA: “As shown, interpolating polygons with the same number of points is straightforward”

I disagree. The code uses a mapping between the corners of the two polygons, but doesn’t discuss how to pick the best one (out of a possible 2n for n-sided polygons).

For example, if you want to interpolate a square to the same square, rotated by 181 degrees, the mapping that maps each corner to its opposite corner produces a nicer animation than the identity mapping.

I don’t think picking the best looking mapping is entirely straightforward. For example, which of these produces nicer results:

- minimize the sum of the distances that the corners move

- minimize the sum of the squares of the distances that the corners move

- minimize the area removed/added during the interpolation

- minimize the amount by which the area of the polygon varies during the interpolation

?

Of course, opinions will differ on what is nicer, but I think everybody will agree the identity mapping isn’t always the nicest.

⇒ I would also use a smarter algorithm for equal-sided polygons