Optimizes linkages for a target curve