
Curve Matcher - chanind
https://github.com/chanind/curve-matcher
======
wanderfowl
Out of curiosity, how is this better than, for instance, using B-splines or
some other smoothing spline to fit a given chunk of data? I'm not being
snarky, I'm just trying to get my head around the use cases for this.

~~~
chanind
The goal of this library isn't to fit data, but rather to determine if 2
curves have similar shape to each other. So, for instance, if want to
determine if a hand-drawn curve has a similar shape to the letter "S" you
could use this library to find a similarity score between the curves.

~~~
wanderfowl
Ahh, I see. Interesting.

------
mkl
This looks neat! I found the Hanzi Writer demo, but you might want to put some
(static) examples in the ReadMe, to explain exactly what the library does.

~~~
chanind
Good call! I just added an image showing 2 curves and their similarity scores
to the readme.

------
foxes
Reminds me of some interesting papers that are related to this topic, off the
top of my head check out [0-1]. Perhaps _relative geodesics_ is a key word to
search. If you picture curves as made out of some sort of pliable material,
you can ask how much energy does it take to deform one curve into another.

[0] [https://arxiv.org/pdf/1305.3572.pdf](https://arxiv.org/pdf/1305.3572.pdf)
[1]
[https://royalsocietypublishing.org/doi/abs/10.1098/rspa.2016...](https://royalsocietypublishing.org/doi/abs/10.1098/rspa.2016.0619)

------
eximius
Very cool.

Any idea what you'd use it for?

~~~
chanind
The original motivation was for doing Chinese character stroke quizzes in
Hanzi Writer [[https://chanind.github.io/hanzi-
writer](https://chanind.github.io/hanzi-writer)]. Beyond that I'm not too
sure, but hopefully it's useful for somebody :)

~~~
vespakoen
Perhaps this could be used for "curve fitting" [0]? (used in CAM software to
optimise CNC toolpaths)

[0]
[https://en.wikipedia.org/wiki/Curve_fitting](https://en.wikipedia.org/wiki/Curve_fitting)

