'Rotating a light cone to a given axis

Suppose I have a cone of evenly distributed points starting at (0,0,0) and with its main axes along (0,0,1). I need to create a python script that rotates all points, so the cone is parallel to (1,1,1). What is the easiest way to to this using spherical coordinates?

For now, I've been transforming my spherical coordinates to cartesian ones, applying Rodrigue's formula and finally transforming the coordinates back again to spherical. But there should be an easier way, right?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source