I am working on a computer program which involves some fairly complicated rotation/translation math.
The current problem I am having is that I have a point on a sphere, which I want to move around the sphere using a vector.
So, to imagine the problem on a flat surface: I have a point at x = 10, y = 10, I subtract the vector (10,0), so the point is now at x = 0, y = 0.
However, the above will not work on a sphere, since the resulting point will not follow the curvature of the sphere.
What I'm asking for is a solution that takes a point and moves that point around a sphere by a distance and direction given by a vector.
If this is impossible, which it may be, I would settle for a solution which takes a point and moves it around a sphere by an angle.
This solution: How can I rotate a coordinate around a circle Solves the latter problem, but only works in two dimensions, would it be possible to convert this to work in 3 dimensions?
Any advice is appreciated.
http://pastebin.com/69tFn51k
I seem to have successfully converted the cartesian coordinates to spherical, at least according to a plot in gnuplot.
I cannot seem to rotate them though, any advice?
– Ronan Collins Aug 30 '16 at 05:54