We show how four-bar linkages can be designed using non-convex optimization techniques. Our generative design software takes as input a curve that needs to be reproduced by a four-bar linkage and outputs the best assembly that approximates this curve. We model the problem using quadratic constraints and show how redundant constraints help to solve the problem. We also provide an algorithm that samples the curve based on its characteristics. Experiments show that our software is faster and more precise than existing systems. The current work is part of a larger generative design initiative at Autodesk Research.