Algorithms have been developed for the design of arbitrary three-dimensional pipe (duct) routing. The pipe center line is defined by a polygon of line segments and an array of elbow radius values. A two-dimensional cross section is positioned and scaled