This Demonstration generates the templates for a branch connection between two cylindrical pipes whose center lines are not necessarily perpendicular and are separated by an offset.

The templates can be used to prepare the metal sheet to weld the two pipes together into a branch connection.

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 [1]. 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: