二次贝塞尔转换为立方? [英] Convert a quadratic bezier to a cubic?

查看:142
本文介绍了二次贝塞尔转换为立方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是算法转换成二次贝塞尔(含3分)为一个立方一(得4分)

What is the algorithm to convert a quadratic bezier (with 3 points) to a cubic one (with 4 points)

感谢

推荐答案

从<一个href="http://fontforge.sourceforge.net/bezier.html">http://fontforge.sourceforge.net/bezier.html:

不限二次样条可以是pssed作为立方(其中立方项为零)前$ P $。立方的端点将是相同的二次的

Any quadratic spline can be expressed as a cubic (where the cubic term is zero). The end points of the cubic will be the same as the quadratic's.

CP <子> 0 = QP <子> 0
  CP <子> 3 = QP 2

CP0 = QP0
CP3 = QP2

这两个控制点的三次分别是:

The two control points for the cubic are:

CP <子> 1 = QP <子> 0 + 2/3 *(QP <子> 1 -QP <子> 0 )
  CP 2 = QP 2 + 2/3 *(QP <子> 1 -QP 2

CP1 = QP0 + 2/3 *(QP1-QP0)
CP2 = QP2 + 2/3 *(QP1-QP2)

...有由于四舍五入推出了轻微的错误,但它是不太可能显着。

...There is a slight error introduced due to rounding, but it is unlikely to be noticeable.

这篇关于二次贝塞尔转换为立方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆