Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Interpolating Polygons (2017) (lambdafunk.com)
21 points by mcovalt on July 15, 2023 | hide | past | favorite | 1 comment


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: