Input: pink shaft.
Output: violet slider. Its center draws four-petalled rose (in violet). Its equation in polar coordinate system OX:
OD = (a/2)*sin(2φ)
φ: angle DOX
a: length of the yellow bar
Green and blue parts are for drawing green four-petalled rose, a reproduction of the violet one.