How to roll up the plane into cylinder? There is a set of points (in cartesian coordinates), that all lie on the plane. The problem is in rolling up the plane into cylinder in selected direction.
I tried transformation of the coordinates into cylindrical coordinate system.
First I defined the value of radius (basing on some not related considerations). Then, I got following coordinates in cylindrical system:
$$\begin{Bmatrix}
\rho_i= \sqrt{x_i^2+y_i^2} \\
\varphi_i= atan(y_i/x_i) \\
z_i=z_i \\
\end{Bmatrix}$$
and substituted $\rho_i$ by the value of calculated radius and performed transformation back to cartesian coordinates:
$$\begin{Bmatrix}
x_i = \rho_icos\varphi_i \\
y_i = \rho_isin\varphi_i \\
z_i=z_i \\
\end{Bmatrix}$$
But as expected, it gave only half-cylinder.
Unfortunately, I am very weak in math, so, I suppose, that there is a simple solution for this problem, but I can not formulate it correctly.
Thanks in advance. MuKeP.
 A: Suppose the unit vector $\mathbf{u}$ is the direction in which one wishes to roll up the plane into a cylinder. If we let the radius of the cylinder $r=\frac{1}{2\pi}$ then the transformation is essentially a rotation of the plane by an angle $\phi$ satisfying $\cos\phi=\mathbf{u}\cdot(1,0)$. Let $\mathbf{v}$ denote the unit vector in the direction of the rotated $y$-axis orthogonal to $\mathbf{u}$. The rotated axes $x^\prime$ and $y^\prime$ are represented by the dotted lines in the diagram.

Construct a cylinder about the $x^\prime$ axis with radius $r=\frac{1}{2\pi}$. Then a point $(x,y)$ will be transformed to a point $(a,b)$ in the rotated system where, using the standard rotation formulas,
\begin{eqnarray}
a&=&\phantom{-}x\cos\phi-y\sin\phi\\
b&=&-x\sin\phi+y\sin\phi
\end{eqnarray}
In the cylindrical coordinates, $r=a,\,\theta=b$. So the transformation is
\begin{eqnarray}
r&=&\phantom{-}x\cos\phi-y\sin\phi\\
\theta&=&-x\sin\phi+y\sin\phi
\end{eqnarray}
It is a many-to-one transformation since the entire plane is wrapped around the cylinder. If a cylinder with a radius different from $\frac{1}{2\pi}$ is desired, then $\theta$ must be scaled accordingly.
