I'm writing a macro with Visual Basic for Autocad. My problem is: 1)I have 2 cylinders with orthogonal vertical axis, so they intersect themselves generating a 3D space curve. Cylinders could have different diameters 2)Now I have to unroll one of them so that the external surface becomes a rectangular with a "hole" (the intersection) Question: what is the equation of the intersection curve in the 2d unrolled plane? It's a sort of ellipse
I need to know it because this "cylinder" is a sort of pressure vessel and the 2d plane is my plate which will be rolled, but I have to cut the exact shape from plate before rolling it.
Thank you

Take a point $P$ on the intersection boundary. Its coordinates with respect to the unrolled vertical cylinder are $PH$ and circular arc $PK$. If cylinder radii are $R$ (vertical) and $r$ (horizontal), and $PH=y$, then $OH=\sqrt{r^2-y^2}$ and arc $PK$ has length $$ x=R\arcsin{\sqrt{r^2-y^2}\over R}. $$ This is then the equation of the intersection curve.