贝塞尔曲线上的等距点 [英] Equidistant points across Bezier curves

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

问题描述

目前,我正在尝试使多个贝塞尔曲线具有等距点.我目前正在使用三次插值来找到这些点,但是由于贝塞尔曲线的工作方式,某些区域比其他区域更密集,并且由于距离可变,纹理贴图很粗糙.有没有办法按距离而不是按百分比在贝塞尔曲线上找到点?此外,是否可以将其扩展到多条连接曲线?

Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance. Is there a way to find points on a bezier by distance rather than by percentage? Furthermore, is it possible to extend this to multiple connected curves?

推荐答案

P_0 和 P_3 之间的距离(立方形式),是的,但我想你知道,这是直接的.

distance between P_0 and P_3 (in cubic form), yes, but I think you knew that, is straight forward.

曲线上的距离就是弧长:

Distance on a curve is just arc length:

图 1 http://www.codecogs.com/eq.latex?%5Cint_%7Bt_0%7D%5E%7Bt_1%7D%20%7B%20|P'(t)|%20dt

哪里:

图 2 http://www.codecogs.com/eq.latex?P%27(t)%20=%20[%7Bx%27,y%27,z%27%7D]%20=%20[%7B%5Cfrac%7Bdx(t)%7D%7Bdt%7D,%5Cfrac%7Bdy(t)%7D%7Bdt%7D,%5Cfrac%7Bdz(t)%7D%7Bdt%7D%7D]

(见其余部分)

可能,你会得到 t_0 = 0、t_1 = 1.0 和 dz(t) = 0(二维平面).

Probably, you'd have t_0 = 0, t_1 = 1.0, and dz(t) = 0 (2d plane).

这篇关于贝塞尔曲线上的等距点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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