Precise Mechanical Rigging (Intuitive method) https://youtu.be/86DtgBiUDvI

Hi,
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 wrt 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.

Thanks.

Note: I do not need a complete solution, just some useful directions and/or resources will suffice.
After a lot of trial and error here's what I could come up with.
It is not perfect and will glitch out at extreme cases, but otherwise works for the most part.

It relies on a system of three empties and relations between them.




The $Start$ $Empty$ - Has a Location constraint to prevent it from going anywhere away from $-0.90$ to $0.90$ in the $X$ axis





The $End$ $Empty$ - Has a Location constraint to prevent it from going anywhere away from $-0.90$ to $0.90$ in the $X$ axis and $0.2$ to $1.8$ in $Z$ direction. Additionally it as a Limit Distance constraint set to On Surface preventing it go further away than $1.8$ from $Start$ $Empty$





Lastly $Tracking$ $Empty$ is parented to $Start$ $Empty$ and has a locked track to the $End$ $Empty$.





The $Upper$ $Arm$ also has a Copy Location on $Z$ axis only from $End$ $Empty$so it keeps position correctly automatically