Change of basis: Cartesian to tilted and shifted cylindrical in 3D

115 Views Asked by At

As a part of a little project I'm doing there is a part where I calculate some density at a point in 3D space. The trick part is that I have the map of densities based on cylindrical coordinates $(r,z)$ while the map is symmetrical to rotation. My problem is that the source releasing the densities while being cylindrical is also shifted from the origin and tilted in an angle such that neither its top or bottom part is laying entirely on some $Z = c$ plane.

The tilt is always in 15 degrees and always pointed towards the cartesian origin's $Z$ axis. The shift is always on the cartesian $Z=0$ plane so the origin doesn't change height.

Basically, How do I transform a coordinate in 3D cartesian space into a coordinate of a tilted and shifted cylinder in 3D?

Here is a picture of some of the cylinders I want to shift my coordinates perspective into.

shifted and tilted cylinders.

The cartesian origin is in the middle of all the cylinders. The cylindrical origin is in the middle of some cylinder respectively. Thanks to everyone helping in the process.