ios - 四点曲线怎么画

标签 ios ios6 ios7 bezier

我可以使用贝塞尔曲线绘制曲线,但我不想指定两个控制点,而是指定路径经过它的两个点,如下所示

enter image description here

起点为(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/

相关文章:

ios - 如何在iphone 的NSUserDefaults 中动态生成多个 key

ios - 将 DT 设置为 iOS5 的 ios7 上的应用程序崩溃( UIKeyAutomaticallyAdjustsScrollViewInsets -不是整数)

ios - 将 UITextField 添加到导航项的标题 View

ios7 - Zombie in Game Center 的 [addPlayersToMatch] 在一个 20-liner 项目中

ios - Xcode 4.5 - CopyPNGFile 仍然存在。需要新的想法

ios - 当它是第一响应者时,我怎么知道 uitextfield 已被击中

ios - 我的应用如何跳转到iOS默认邮箱?

iphone - 将第三方库添加到 iPhone 应用程序时如何设置 'Header Search path' 的路径

ios - 获取应用内购买产品列表?

iphone - 将二进制数据附加到文件