Design of Space Mechanisms for Function Generation