开发者

iPhone - creating the smoothest curve

开发者 https://www.devze.com 2023-03-11 14:38 出处:网络
I have this iPhone app that has an array containing around 50 to 100 points. How do I calculate the smoothest curve that will fit the points? It can be bezier, cubic, quadratic, whatever. It just have

I have this iPhone app that has an array containing around 50 to 100 points. How do I calculate the smoothest curve that will fit the points? It can be bezier, cubic, quadratic, whatever. It just have to look smooth and fit as much as possible all points (obviousl开发者_高级运维y, as I did in my drawing, to create a smooth curve, some points have to be created out of the original set... no problem).

See picture:

iPhone - creating the smoothest curve


Maybe you are looking for a Cubic Spline Cubic Spline

These are the functions with continous second derivative that interpolate your nodes with the smallest curvature so they oscillate less. And there are lots of examples and algorithms to find these.

0

精彩评论

暂无评论...
验证码 换一张
取 消