Gear and Linkage Mechanism

The gears have a same tooth number.
Input : Blue gear rotating regularly.
The red pin traces a complicated curve in general.
This video is for special case, when a part of the red pin locus is linear:
Gear pitch diameters : 50
Crank radius of the blue gear : 5
Crank radius of the yellow gear : 18
Length of the pink bar : 62
Length of the green bar : 60 + 38
Assembly position: as start position of the simulation video.