mathcubic-bezier

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


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.

enter image description here

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.


Solution

  • 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.