The "Cardan Straight Line Mechanism" (or "Epicyloid Straight-Line Linkage") transforms rotation into a linear movement. The condition is that the number to teeth of the stationary sun (yellow, here 32 teeth) gear is twice the number of teeth of the outer planet (red, here 16 teeth). The lever on the outer planet is as long as the distance between the centers of the sun and the outer planet. The inner planet (blue) is an <a href="https://en.wikipedia.org/wiki/Idler_gear" class="extiw" title="w:Idler gear">idler gear</a>, the number of its teeth is irrelevant for the function.
<a href="//commons.wikimedia.org/wiki/User:Jahobr" title="User:Jahobr">Jahobr</a>
<p><span class="int-own-work" lang="en">Own work</span>; Based on:
</p>
<ul><li><a rel="nofollow" class="external free" href="http://blog.rectorsquid.com/sample-linkage-mechanisms-2/">http://blog.rectorsquid.com/sample-linkage-mechanisms-2/</a></li>
<li><a rel="nofollow" class="external free" href="https://www.geogebra.org/m/uaguEEM8">https://www.geogebra.org/m/uaguEEM8</a></li>
<li><a rel="nofollow" class="external free" href="https://web.archive.org/web/20180418124753/http://kmoddl.library.cornell.edu/model.php?m=139">https://web.archive.org/web/20180418124753/http://kmoddl.library.cornell.edu/model.php?m=139</a></li></ul>