Line between circles in space?

Say I have 2 circles which are rotating in space, sometimes parallel, sometimes perpendicular to each other. I have a line segment which is attached to a point on one circle, and must remain of a constant length while also touching the other circle. This is better illustrated by the following animation:

www.versatileartist.com/temp/circles.avi

I need to find a way to describe the point shown by the yellow cube in terms of the point shown by the green one.

Can anyone show me how to do this??