I trying to optimize "SnapSVG path2curve" function with calculate control points.
I have alteative way, but it's very slow: '#Demo1': http://bl.ocks.org/mbostock/3916621
So, question is:
-
Path have like "M50,50 C50,10,35,90,55,15"
-
I converted it, but it looks like "[50, 50], [50, 10], [35, 90], [55, 15]".
-
I want control points like '#Demo1'. (It's uses getPointAtLength)
Why?
-
For shifting bezier
-
Change bezier points order to more good looking
Please help to make this, credits goes to that user.
Requirement: JavaScript, Simple (if possible).
Alteative search: Convert path to polygon
