Calculating an increasing angle in Spherical Coordinates

23 Views Asked by At

I'm making a program that generates lines in 3D space. One feature that I need is to have an incrementally increasing angle on a line (a bending line / curve).

The problem is simple if the line exists in the xy-plane, then it would be a case of stepping say 1m, increase the azimuthal angle φ (phi) with 5 degrees, step 1m more, increase phi by an additional 5 degrees etc...

Similar, if the line exists in the zx- or zy-plane, it would be a case of increasing the polar angle θ (theta) incrementally with say 5 degrees.

But how do I increase my line angle by say 5 degrees per 1m on a line that exist outside the planes mentioned above using a combination of azimuthal and polar angle? Lets say that I have another angle, alpha, which is the angle between the plane which my curve exists in and vertical (z), i.e. if alpha is 0 the curve will be completely vertical and if alpha is 90 degree the curve will be completely horizontal...

Any help or bright ideas getting me closer to a solution is much appreciated

Reference to angles

Kind Regards, Peter