gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 12:43:11 27 4
gpt4 key购买 nike

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com