stefmolin / data-morph

Morph an input dataset of 2D points into select shapes, while preserving the summary statistics to a given number of decimal points through simulated annealing. It is intended to be used as a teaching tool to illustrate the importance of data visualization.
https://stefaniemolin.com/data-morph/
MIT License
60 stars 16 forks source link

Start shape infinity #186

Closed roynico closed 2 months ago

roynico commented 2 months ago

I noticed a possible weakness of the morph algorithm. When both start and end figures have sort of very different distributions of points in the square, then:

This new figure "infinity" provides a good example: data-morph --start-shape infinity --target-shape star does not achieve the desirable result after 100k iterations: infinity-to-star_100k And with 300k, one sort of reaches the final shape "star" but part of the figure are missing (i.e filled with very little points): infinity-to-star_300k

I guess the reason is because the point in the star are pretty much distributed roughly on a circle. And for the infinity, there are very few points on the top and bottom parts. This effect does not appear in the morphing "start-> panda" for example, because both shapes are roughly similar "circles".

stefmolin commented 2 months ago

@roynico - Someone in the room has already been working on the infinity and figure eight shapes. If you are contributing as part of sprints, please come to the room so we can discuss what to work on and how to make sure you are running the latest version of the code, as I do not want to touch the code of conduct file and another participant has submitted a tweak to have the pre-commit checks ignore that file.

roynico commented 2 months ago

OK. No problem. Please close my PR. I guess there are already enough contributors to this sprint.

roynico commented 2 months ago

Closed. Task already attributed to somebody else.