Geometry – Find Sagitta of a Cubic Bézier-Described Arc

bezier-curvecirclesgeometry

I have a situation where I have an arc that was mangled1. The original arc is guaranteed to be circular, and the new data I have describes the Bézier approximation for the arc instead. I'm not hugely up on Béziers, or complex geometry, so am hoping someone can help me!

Knowns:

  • I have four points which describe a circular arc
  • Points 1 and 4 are the two end points of the arc
  • Points 2 and 3 are the cubic Bézier control points, i.e are tangential to the arc at each end

It looks like this:
Problem

I'm trying to find the length of the line labelled as 'x', which I understand is the Sagitta.


1 Irrelevant to the question, but in case it helps others in the same situation, the mangler was c#'s GraphicsPath.AddArc() function

Best Answer

From the equation of a cubic Bézier curve, the midpoint of the curve is $\frac{1}{8}(P_1 + 3 P_2 + 3 P_3 + P_4)$. $x$ is the distance from that midpoint to $\frac{1}{2}(P_1 + P_4)$, i.e. $|\frac{3}{8}(-P_1 + P_2 + P_3 - P_4)|$.