I want to divide a cubic bezier curve, with 4 points, start, end and 2 control points, into segments that are not bigger then a certain distance. So, am looking for a computationally quick way to approximate the arc length of curve.
[Math] Approximate arc length of cubic bezier curve
bezier-curvegeometry
Related Solutions
The simplest approach is to use $N+1$ points to construct a curve of degree $N$. You have to assign a parameter ($t$) value to each point. So, to construct a cubic curve through four given points $\mathbf{P}_0$, $\mathbf{P}_1$, $\mathbf{P}_2$, $\mathbf{P}_3$, you need four parameter values, $t_0, t_1, t_2, t_3$. Then, as @fang said in his answer, you can construct a set of four linear equations and solve for the four control points of the curve. Two of the equations are trivial, so actually you only have to solve two equations.
The simplest approach is to just set $$t_0 = 0 \quad , \quad t_1 = \tfrac13 \quad , \quad t_2 = \tfrac23 \quad , \quad t_3 = 1$$ Then the matrix in the system of linear equations is fixed, and you can just invert it once, symbolically. You can get explicit formulae for the control points, as given in this question. But this only works if the given points $\mathbf{P}_0$, $\mathbf{P}_1$, $\mathbf{P}_2$, $\mathbf{P}_3$ are spaced fairly evenly.
To deal with points whose spacing is highly uneven, the usual approach is to use chord-lengths to calculate parameter values. So, you set $$c_0 = d(\mathbf{P}_0, \mathbf{P}_1) \quad ; \quad c_1 = d(\mathbf{P}_1, \mathbf{P}_2) \quad ; \quad c_2 = d(\mathbf{P}_2, \mathbf{P}_3)$$ Then put $c = c_0+c_1+c_2$, and $$t_0 = 0 \quad , \quad t_1 = \frac{c_0}{c} \quad , \quad t_2 = \frac{c_0+c_1}{c} \quad , \quad t_3 = 1$$
Then, again, provided $t_0 < t_1 < t_2 < t_3$, you can set up a system of linear equations, and solve.
If you're willing to do quite a bit more work, you can actually construct a cubic curve passing through 6 points. Though, in this case, you can't specify the parameter values, of course. For details, see my answer to this question.
Best Answer
Use subdivision and stop recursion when the line segment joining the two endpoints is small enough. Not the same thing as arc length, but will probably be good enough.
If you want to approximate the arc length of a Bézier curve, see my answer in this question.