ldries46 said:
Is there somewhere a standard routine for rotating a point in 3D stace in
the two directionsgiven the angles Theta and phi
There isn't, already since there is no "point in 3D space"
defined in the standard. You could be talking about three
floating point values representing the "point" (in cartesian
spherical, cylindrical or even some kind of elliptical coor-
dinates etc.) or you may have some class that represents a
"point" in whatever way you deem to suit for your problem
best etc.
And then it's not clear what you mean by "rotation in the di-
rections given the angles theta and phi". Theta and phi are
normally used as the names of the two angles describing (to-
gether with the radius) the position of a point in spherical
coordinates. If you want to rotate the point by an angle you
must also tell which axis the rotation is to be done around,
just having an angle won't do. Phi and theta don't define di-
rections by themselves. It might be possible that you mean
by "rotation in the direction given by phi" a rotation around
the z-axis by the angle phi, and for theta a rotation around
the direction perpendicular to the plane defined by the z-axis
and the vector from the origin to the point under consideration.
Or you might be talking about Euler angles. But this is just
pure speculation...
Rotations around two axes also require the sequence the rota-
tions are to be done in to be specified since rotations are
non-commutative (i.e. if you turn something e.g. around the
z-axis by 90 degrees first and then around the x- axis also
by 90 degress you will end up at a different position than
when you do the second rotation first and only then the se-
cond).
Regards, Jens