I have two cylinders with different diameters. The cylinders are positioned in the space as follows:
A rubber band wraps around the cylinders.
I need to develop a computer algorithm to calculate the position and twisting of the rubber band in space. I would like to approximate the rubber band by a simple mesh as shown in the sketch (i.e. the edges of the rubber band are approximated by polylines).
In the example shown here the cylinder axes do not intersect and are rotated by 90 degrees against each other. There will be cases where the axes might intersect at a very low angle and/or the axis are rotated against each other by an angle which differs from 90 degrees.
How can I solve this problem?

Here is a complete remodeling of my previous answer.
Take a look at Fig. 1.
Fig. 1.
This figure represents the central part of the rubber band constituted of 2 circle arcs (in blue) and 2 cubic Bezier curves connecting them (in red and black resp.), preserving not only continuity but also the differentiability at the connecting points between circular arcs and Bezier curves. The left cylinder has been tilted from an initial vertical position by an angle $a$ ($a=\pi/6$ here) around $Ox$ axis represented here splitting the horizontal plane into two parts. The right cylinder has been tilted by an opposite angle $-a$.
The four points that define one of the Bezier curve (the red one) are pictured as small circles. Two of them are clearly obtained as endpoints of the circular arcs, the other two are obtained by approximating speed vectors at the said endpoints.
You will find at the end the Matlab program that has generated Fig. 1.
Fig. 2 is a compulsory aid in order to understand the situation before the cylinders are tilted and the numerous implementation details :
Fig. 2.
Remark : the conventions taken are WLOG (Without Loss Of Generality) : in particular, Ox axis has been selected as directed by the shortest line segment between the cylinders. And through this axis, there always exists a plane such that the axes of the two cylinders make angles $\pm a$ with this plane.