3

I do not know how to approach this math problem. Any hint would be much appreciated. Before I could solve such problem using Atan2 method to get two vector angles, when axes c and a are orthogonal.

Problem: there are two non orthogonal to each other vectors c and a. I need to rotate one time around vector c then around vector a to obtain vector v orientation.

Question: how can I get c and a vector rotations, when I only know vector v orientation?

In the image below, c and a vector rotations are both 0.

enter image description here

I was using atan2 for orthogonal system to get two rotations, but in this cases axis A is not perpendicular to C.

double RotationC = Math.Atan2(V_.X, V_.Y);
double RotationA = Math.Atan2(Math.Sqrt(V_.X * V_.X + V_.Y * V_.Y), V_.Z);
  • 2
    You should tag `C++` once you have code that implements your idea, but doesn't work properly. You shouldn't tag C++ just because the language you *may* be using to implement your idea is C++. Right now, this is purely a math-based question. – PaulMcKenzie Sep 23 '21 at 23:05
  • I edited the tags sorry for confusion – PetrasVestartasEPFL Sep 24 '21 at 06:48

0 Answers0