Simple crank slider mechanism (matlab code).