将二次贝塞尔曲线(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/