A Biarc consists to two circular segments joined with tangent continuity. Given two points and two tangents at the points an interpolating biarc is a biarc that starts and ends at the points and whose circular segments match the tangents at the points. An interpolating biarc is not unique, in fact a whole family of interpolating biarcs can be found.
In the beginning i used the derivation of Ryan Juckett:
http://www.ryanjuckett.com/programming/biarc-interpolation/
He derives an equation for two parameters, and eliminates one to get a quadratic equation to be solved given a single parameter that defines the family of interpolating biarcs, the ratio of the distance of the tangent points of each circular segment to the end points. This works quite well, but the paramter isn't very intuitive as is ranges over all numbers and the geometric meaning of manipulating this ratio is not very clear. Plus the original TPE uses another parametrization and i couldn't reproduce the original circle segments from an original ted file.
Instead i used a different insight: The joint point where the two segments of a interpolating biarc meet is constrained to lie on a circle, in fact all joint points of an interpolating biarc family form this circle., see here:
http://www.ag.jku.at/pubs/2006sfj.pdf
Finding this circle isn't too hard: It's center is given as the center of the unique rotation transforming the start tangent from the start point into the end tangent to the end point. As i was using
rational quadratic bezier circles for all circles already i only needed the tangent of the joint circle, not the center. The tangent of the circle at the start point is given by the angle bisector of the reflection of the end tangent at the chord (line between start and end point) and the start tangent, as the end tangent is just the reflection of the start tangent on a chord of the circle of rotation and the tangent to this circle must lie between the tangents bisecting the angles formed by both tangents.
This insight was worth all the puzzling, and now i can reproduce original ted layouts and i have added handles to move the joint point over the full circle range for full biarc design flexibility. Plus the joy of discovering beautiful mathematics!