The cardan-gear mechanisms invented by Girolamo Cardano in the 16th century is used to convert rotation motion to reciprocating linear motion without using linkages or slideways. In order to achieve this the gear ratio of the large gear to the small should be 2/1.
The image above shows that the length of the arm is equal to the distance between the center of the large gear and the outer small gear. If this distance is equal to D, than the tip of the arm travels 4D for each revolution of the triangle block.