如何获得贝塞尔曲线平均距离的t [英] How to get t for average distance of Bézier curve

查看:113
本文介绍了如何获得贝塞尔曲线平均距离的t的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下公式计算贝塞尔曲线的插值位置:

I am calculating the interpolation position of Bézier curve by using the formula:

pow(1 - t, 2) * start + 2.0 * (1 - t) * t * control + t * t * end

问题是,如果我对每个片段线性地按t步长,例如0.1,则贝塞尔曲线上的片段长度不是平均的.

The problem is that if I linear step the t by for example 0.1 per segment, the length of segment on the Bézier curve is not average.

有什么方法可以获取相应的t数组,以获取曲线上线段的平均长度或近似平均长度.

Is there any way to get the corresponding array of t for getting average or approximately average length of the segment on the curve.

推荐答案

似乎您希望通过弧长进行近似参数化.

It seems you want an approximate parametrization by arc length.

对于二次情况,贝塞尔曲线的弧长有一个闭合形式的表达式,但是它很复杂,您仍然需要查表.这些论文讨论了通用技术:

For the quadratic case, there is a closed-form expression for the arc length of a Bézier curve, but it is complicated and you still need table lookup. These papers discuss general techniques:

  • Approximate Arc Length Parametrization, in SIBGRAPI 1996.

参数曲线的自适应采样,在Graphics Gems V中,1995年.

Adaptive sampling of parametric curves, in Graphics Gems V, 1995.

计算参数曲线的弧长,在IEEE计算机图形学和应用程序中, 1990.

Computing the arc length of parametric curves, in IEEE Computer Graphics and Applications, 1990.

用于估计参数曲线长度的基于点的方法,发表于《计算与应用数学杂志》,2006年.

Point-based methods for estimating the length of a parametric curve, in Journal of Computational and Applied Mathematics, 2006.

这篇关于如何获得贝塞尔曲线平均距离的t的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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