algorithm - 将二次贝塞尔曲线转换为三次贝塞尔曲线

标签 algorithm vector graphics bezier cubic-bezier

将二次贝塞尔曲线(3 点)转换为三次贝塞尔曲线(4 点)的算法是什么?

最佳答案

来自 https://fontforge.org/docs/techref/bezier.html#converting-truetype-to-postscript :

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.

CP0 = QP0
CP3 = QP2

The two control points for the cubic are:

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.

关于algorithm - 将二次贝塞尔曲线转换为三次贝塞尔曲线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3162645/

相关文章:

java - Prim算法实现错误,Empty Heap

返回列表 r 中的向量位置

c++ - 无法将 cocos2d::Animation * 存储在结构的 std::vector 中?

c# GDI 边缘空白检测算法

r - Base R 中的图例 : Can fill refrain from drawing boxes on some lines? 可以填充覆盖整个符号的绘制框吗?

java - 计算 2 个链表中值的总和

c++ - 用条件 C++ 重复给定字符排列的算法

c++ - 带有恢复选项的 C++ 中的暴力字符串生成器

c - 将 SIMD Vector 动态分配为 double 组

c++ - QT 鼠标移动事件是否在单独的线程中?以及如何解决与此相关的绘画应用程序问题