soswow / fit-curve

JavaScript implementation of Philip J. Schneider's "Algorithm for Automatically Fitting Digitized Curves" from the book "Graphics Gems". Converted from Python implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug when splitting at a (presumably) really sharp corner

Sphinxxxx opened this issue · comments

From @Sphinxxxx on July 15, 2016 17:30

When fitting points where there's a sharp corner, and the points at either side of that corner are equal, fitCubic() isn't able to calculate the centerTangent when splitting the curve.

Example points (2 x [70,50] at either side of [72,40]):

[[15,20], [25,50], [50,75], [70,50], [72,40], [70,50], [80,80], [95,90]]

Copied from original issue: Sphinxxxx#4