Given a generic rational curve $C$ in the group of Euclidean displacements we construct a linkage such that the constrained motion of one of the links is exactly $C$. Our construction is based on the factorization of polynomials over dual quaternions. Low degree examples include the Bennett mechanisms and contain new types of overconstrained 6R-chains as sub-mechanisms.