svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.15k stars 1.08k forks source link

Question: Calculate similarity between shapes? #1057

Closed JoaoFGuiomar closed 4 years ago

JoaoFGuiomar commented 4 years ago

First of all congrats for such a great work.

Question: Would it be possible to calculate the similarity of 2 shapes?

Example: hand drawn rect vs a rect shape and see how close the hand drawn shape is to the rect shape?

Fuzzyma commented 4 years ago

Thanks! :)

Thats a question which is REALLY unrelated to svg.js. Not even really related to svg or javascript at all. I bet what you want breaks down to a mathematical problem so you might want to post it on https://math.stackexchange.com/

JoaoFGuiomar commented 4 years ago

Makes sense!

I was planning on using methods from this lib to grab points, calculate angles, and so on, and do the math problem afterwards to calculate similarity.

Thank Fuzzy!