Search code examples
graphicsinterpolationbeziercurve

Equidistant points across Bezier curves


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?


Solution

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

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

    where:

    fig 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]

    (see the rest)

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