Mechanism for transforming rotation into translational motion