Two Ellipses In a Third with Arcs

Now that you know how these ellipses are controlled to rotate with their implicit equations, arcs have been added and constrained such that they rotate with the ellipses always covering half of each ellipse and always ending at the tangent point of the two smaller ellipses.

This document requires an HTML5-compliant browser.
X
0 0 6.283
a
0.5 0 2
b
0.25 0 1
h
-2 0 -0.5
k
1 0 4

Can you figure out how the endpoints of the arcs are constrained (proportionally around the ellipses)?

App generated by Geometry Expressions