我想我需要取相关向量的行列式,以找出角度的测量方式
-
- N = 0,0,1; this is the direction of the normal describing the xy plane
- M = 0,1,0; This vector defines north
- U = Ux,Uy,Uz; this is the vector that I want to find the angle of relative to M
- For an example, lets say U = -1,1,0; this would put the vector in the 2nd quadrant and it should have an angle of 315 degrees. If I use the procedure in my last post I get an angle of 45 degrees.
- Now if I find the determinant of:
- |-1 1 0|
- | 0 1 0| = -1
- | 0 0 1|
- I believe, according to the sign that the angle has been calculated the wrong way. So If I take 360 and subtract 45 I arrive at 315 degrees. Which is what I want.
- Say I used U=2,2,0 which is 45 degrees, I would get
- | 2 2 0|
- | 0 1 0| = 2
- | 0 0 1|
- The positive result would indicate that I do not need a correction.
- If the result is 0, it means that the vectors are parallel.
我找遍了所有地方,似乎找不到答案(或者至少我能理解)。我相信对3个向量进行确定并检查结果的符号是正确的方法。我已经对一些案例的结果进行了测试,在每种情况下似乎都有效。我没有改变我工作的平面或北向量的方向
有人能帮我核实一下吗?或者我做的事情有误吗? |