I have done this using the y-rotation of the Blue rod to drive its z-location. The Top rod is driven by the z-location of the Blue rod.
As you can see, the animation looks imprecise, and the calculation behind it is also not intuitive (for one, the reverse control using $asin(x)$ does not work). Sure I could tweak things to fit, but I'm instead looking for some method to precisely rig these bodies intuitively. So far I have known these methods for mechanical rigging: a) Constraints b) Drivers c) Armatures and d) Physics.
My questions:
a) Is there any way to actually rig (complexity does not matter) by simply constraining the bodies with regards to each other without actually calculating any of the mechanics of motion that the setup will entail?
b) Are there other methods that I have not mentioned above?