How to get t for average distance of Bézier curve

自作多情 提交于 2019-12-24 15:33:05

问题


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

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.

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


回答1:


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.

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

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

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



来源:https://stackoverflow.com/questions/28761357/how-to-get-t-for-average-distance-of-b%c3%a9zier-curve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!