A simple formula for computing the length of a quadratic Bezier arc

We derive a simple formula to compute the length of a quadratic Bezier arc whose control points are \((a,b,c)\in(\mathbb R^2)^3\). Existing codes can be found here and there: The process is to convert the arc from the Bernstein basis \((a,b,c)\) to a standard polynomial basis, then compute the derivative vector and calculate the integral. The result is expressed in terms of elements produced during the integration. Here, we go one step further and re-express the final formula in terms of \(A,C\) and \(S=A+C\). The resulting formula is simpler and nicely symmetric.
--
Samuel Hornus, February 26, 2020.
modified June 23, 2026 to better see the symmetry.

The polynomial transform

We obtain \(P(t)=S t^2 - 2 A t + a\) where \(\left\{\begin{array}{ll} A &= a-b\\ C &= c-b\\ S &= A+C \end{array}\right..\)

Its derivative is \(P'(t)=2(St-A)\) whose length is \(|P'(t)|=2\sqrt{t^2|S|^2-2t(S\cdot A)+|A|^2}\).

The length of the quadratic arc is \(\displaystyle\ell=\int_{t=0}^{t=1}{|P'(t)|dt}\).

Computing the integral

Setting \(\left\{\begin{array}{ll} D &= \displaystyle\frac{-(S\cdot A)}{|S|^2}\\ E &= \displaystyle\frac{|A|^2}{|S|^2} \end{array}\right.\), we get \(\displaystyle\ell=2|S|L\) with \(L=\int_{t=0}^{t=1}{\sqrt{t^2+2Dt+E}dt}\).

With the change of variable \(u=t+D\), we obtain \(\displaystyle L=\int_{u=D}^{u=1+D}{\sqrt{u^2+K}du}\), with \(K=E-D^2=\displaystyle\frac{|S|^2|A|^2-(S\cdot A)^2}{|S|^4}\).

We use the known result that \(\displaystyle \int{\sqrt{u^2+K}du}=\frac12\left[u\sqrt{u^2+K}+K\log{\left(u+\sqrt{u^2+K}\right)}\right]\).

Setting \(\displaystyle M(u)=u\sqrt{u^2+K}+K\log{\left(u+\sqrt{u^2+K}\right)}\), we get \(\displaystyle\ell=|S|\left(M(1+D)-M(D)\right)\).

Computing \(M(1+D)\)

If \(u=1+D\) we obtain \(\left\{\begin{array}{ll} \sqrt{u^2+K} &=\displaystyle\frac{|C|}{|S|}\\ u&=\displaystyle\frac{S\cdot C}{|S|^2} \end{array}\right.\).

So, \(M(1+D)=\displaystyle\frac{|C|(S\cdot C)}{|S|^3}+K\log{(|S||C|+S\cdot C)}-K\log{\left(|S|^2\right)}\).

Computing \(M(D)\)

If \(u=D=\displaystyle\frac{-(S\cdot A)}{|S|^2}\) we obtain \(\sqrt{u^2+K} =\displaystyle\frac{|A|}{|S|}\).

So, \(M(D)=\displaystyle\frac{-|A|(S\cdot A)}{|S|^3}+K\log{(|S||A|-S\cdot A)}-K\log{\left(|S|^2\right)}\).

The length now depends on 3 vectors, \(A=a-b\), \(C=c-b\) and \(S=A+C\):

\(\ell=\displaystyle \frac{|C|(S\cdot C)+|A|(S\cdot A)}{|S|^2} + \left(\frac{|S|^2|A|^2-(S\cdot A)^2}{|S|^3}\right)\times\left(\log{(|S||C|+S\cdot C)} - \log{(|S||A|-S\cdot A)}\right) \).

Notice that \(|S|^2|A|^2-(S\cdot A)^2 = |S|^2|A|^2\sin^2(\text{angle between $S$ and $A$})=\det^2(S,A)=\det^2(C,A)\).

Finally

\(\ell=\displaystyle \frac{|C|(S\cdot C)+|A|(S\cdot A)}{|S|^2} + \frac{\det^2(C,A)}{|S|^3} \log{\frac{|S||C|+S\cdot C}{|S||A|-S\cdot A}} \).


The \(\log\) part does not seem symmetric, so is it really? i.e., do we have \( \frac{|S||C|+S\cdot C}{|S||A|-S\cdot A} = \frac{|S||A|+S\cdot A}{|S||C|-S\cdot C} \)? The answer is yes (has to be!): let \( \alpha\) (resp. \( \beta\)) be the angle between \(S\) and \(A\) (resp. \(C\)). Then we need to check that \(\frac{|C|(1+\cos\beta)}{|A|(1-\cos\alpha)} = \frac{|A|(1+\cos\alpha)}{|C|(1-\cos\beta)} \) which is equivalent to \( |C|^2\sin^2\beta = |A|^2\sin^2\alpha \) which is true, as can be seen by drawing a triangle with edge lengths \(|A|\), \(|C|\) and \(|S|\).