The main cylinder has equation and the branch cylinder has equation , where and are the radii of the two pipes, is the offset between the two center lines, and is the angle between them.
The templates are the unwrapped curves of the intersection of the cylinders . If is eliminated from the equations of the cylinders, a single equation is obtained that can be converted to cylindrical coordinates. This gives the quadratic equation in :
Solving for and squaring the solutions yields the implicit equations for the unwrapped intersection curves: