Design and Analysis of a Flapping Wing Mechanism for Optimization