计算二次贝塞尔曲线段的长度

编程入门 行业动态 更新时间:2024-10-09 21:22:47
本文介绍了计算二次贝塞尔曲线段的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用此算法来计算二次贝塞尔曲线的长度: www.malczak.linuxpl/blog/quadratic- bezier-curve-length/

I use this algorithm to calculate the length of a quadratic bezier: www.malczak.linuxpl/blog/quadratic-bezier-curve-length/

但是,我想做的是计算从0到t的贝塞尔曲线的长度,其中0≤t. t < 1

However, what I wish to do is calculate the length of the bezier from 0 to t where 0 < t < 1

是否可以修改上面链接中使用的公式以获取贝塞尔曲线第一段的长度?

Is there any way to modify the formula used in the link above to get the length of the first segment of a bezier curve?

为了澄清,我不是在寻找q(0)和q(t)之间的距离,而是寻找这些点之间的弧长.

Just to clarify, I'm not looking for the distance between q(0) and q(t) but the length of the arc that goes between these points.

(我不希望使用自适应细分来接近长度)

(I don't wish to use adaptive subdivision to aproximate the length)

推荐答案

由于我确定该变量t的情况下将存在类似的表单解决方案-我扩展了链接中给出的解决方案.

Since I was sure a similar form solution would exist for that variable t case - I extended the solution given in the link.

从链接中的方程式开始:

Starting from the equation in the link:

我们可以写成

b = B/(2A)和c = C/A的地方.

然后转换u = t + b我们得到

k = c - b^2

现在,我们可以使用链接中的积分标识来获取:

Now we can use the integral identity from the link to obtain:

因此,总的来说,所需的步骤是:

So, in summary, the required steps are:

  • 按照原始方程式计算A,B,C.
  • 计算b = B/(2A)和c = C/A
  • 计算u = t + b和k = c -b^2
  • 将这些值插入上面的公式中.
  • Calculate A,B,C as in the original equation.
  • Calculate b = B/(2A) and c = C/A
  • Calculate u = t + b and k = c -b^2
  • Plug these values into the equation above.
  • 更多推荐

    计算二次贝塞尔曲线段的长度

    本文发布于:2023-11-29 06:54:50,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1645665.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:塞尔   曲线   长度

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!