我可以使用贝塞尔曲线绘制曲线,但我不想指定两个控制点,而是指定路径经过它的两个点,如下所示
起点为(10,90),终点为(70,70),曲线经过(20, 50),为峰值点。和(60,100)。请告诉我如何绘制它。
最佳答案
来自维基百科中的“贝塞尔曲线”文章:
Any series of any 4 distinct points can be converted to a cubic Bézier curve that goes through all 4 points in order. Given the starting and ending point of some cubic Bézier curve, and any two other distinct points in sequence along that curve, the control points for the original Bézier curve can be recovered.[3]
最后链接到 http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html
关于ios - 四点曲线怎么画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20417456/