Residual dipolar couplings (RDC) of proteins dissolved in anisotropic media promise to speed up the determination of protein structures. We consider the backbone as a robotic mechanism and formulate inverse kinematics problems using RDC restraints from two media. The φ, ψ of each secondary structure element (SSE) are computed from oriented vectors in consecutive peptide planes. We search for the optimum conformation joining the solutions of two independent backbone halves. The matrix transforming the vector Z of a global frame from one SSE into the other determines their orientation. Three distance constraints between two oriented SSE determine their relative position by solving nine polynomial equations. The benefit of this method is that complete and accurate solutions are obtained overcoming the local minima problems of heuristic procedures. The algorithm is implemented on MAPLE using the least number of experimental data; the runtimes take an order of seconds on a common PC. © 2013 Wiley Periodicals, Inc.