-1

Please click to see image

I am trying to rotate a vector as shown in the image.The co ordinate system is not the global xyz. I have the vector for each of the axis of my coordinate system.

6502
  • 112,025
  • 15
  • 165
  • 265
sangith
  • 1
  • 2
  • create a [transform matrix that represents your coordinate system](https://stackoverflow.com/a/28084380/2521214) and multiply it by incremental rotation matrix ... than simply transform your vector by it ... another option is to use [Rodrigues_rotation_formula](https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula) but that is more complicated ... – Spektre Apr 23 '19 at 07:04

1 Answers1

0

What you are describing is the spherical coordinate system.

General rotation around any 3d axis is trivial when expressed in euclidean coordinates (a matrix) but would be terribly complex expressed in a spherical coordinate system.

Just convert to euclidean, do the rotation and finally convert back.

6502
  • 112,025
  • 15
  • 165
  • 265