I have a set of data presented in Cartesian coordinates, ($x$, $y$, $z$). There is a cylinder with its base centered at ($x_0$, $y_0$, $z_0$) and its axis pointing in an arbitrary direction, $\phi_0$ (with respect to +$x$ axis) but otherwise parallel to and above the $xy$ plane.
My question is how to convert the ($x$, $y$, $z$) (that are with respect to the origin of the Cartesian coordinate system) to ($\rho$, $\phi$, $z$) (that are with respect to the the cylinder defined above)?
Thank you for your help
I suggest you do the transformation in steps: