How to determine t value of original cubic bezier curve after subdivide such curve twice with each t = 0.5?

huangapple go评论60阅读模式
英文:

How to determine t value of original cubic bezier curve after subdivide such curve twice with each t = 0.5?

问题

The translated content is:

这个作为初始的三次贝塞尔曲线,首先在 t=0.5 处细分,得到点 K,然后我想要进一步细分第二半部分的三次贝塞尔曲线 KJGD,得到一个点,我们称之为 M。

How to determine t value of original cubic bezier curve after subdivide such curve twice with each t = 0.5?

我的问题是:如果我在点 M 处细分原始的三次贝塞尔曲线 ABCD,那么 t 的值是多少?是不是 0.5 + 0.5 * 0.5 = 0.75?(首次 t=0.5 加上第二部分(0.5)的一半(0.5))

我使用 C++ 作为编程语言。

英文:

Take this as initial cubic bezier, first subdivide with t=0.5 get point K, then I want to further subdivide the second half cubic bezier KJGD, get a point, let's say M.

How to determine t value of original cubic bezier curve after subdivide such curve twice with each t = 0.5?

My question is: If I subdivide the original cubic bezier ABCD at the point of M, what is the t value? is it 0.5 + 0.5 * 0.5 = 0.75? (first t=0.5 plus half (0.5) of the second part (0.5))

I use c++ as programming language.

答案1

得分: 0

如果 S0 是您的原始分割点 (在您的情况下为0.5), 而 S1 是第二曲线上的分割点 (同样是0.5在您的情况下), 那么是的,您在原始曲线上的分割点是:

S0+(1-S0)*S1,

0.5+(1-0.5)*0.5 == 0.75.

英文:

If S0 is your original split point (0.5 in your case), and S1 is the split on the second curve (again, 0.5 in your case), then yes, your split point on the original curve is:

S0+(1-S0)*S1,

0.5+(1-0.5)*0.5 == 0.75.

答案2

得分: 0

这不是将曲线细分,而是使用递归的De_Casteljau算法来计算从t处的值(BEZIER上的点),因此如果您使用了t=0.5,它的值将始终保持不变...

如果您想获得到BEZIER上距离某点M最近的t值,那么您需要一个反向过程,请参见:

英文:

This is not subdividing the curve but its recursive De_Casteljau algorithm to compute the value (point on BEZIER) from t so the value of t is never changing if you used t=0.5 it stays the same all the way ...

If you want to obtain t of closest point on BEZIER to some point M then you need a reverse process see:

huangapple
  • 本文由 发表于 2023年5月21日 22:47:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76300466.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定