Blue and orange parts are connected by a spherical joint with a pin (in red). It can be replaced with a Hook joint to get larger rotary angles.
Blue and green parts are connected by a planar joint.
Inputs: orange and green parts.
Output: blue part of 2 degrees of freedom (rotations).
Advantage: motors (not shown) are base grounded.
The combination of input velocities or turning angles gives various output motions or positions.