Optimal synthesis of a six-bar linkage