2015-06-18 42 views
1

我試圖找到給定圓的中心的圓的旋轉。該圓需要垂直於通過原點的矢量, illustration。 對於最初基於XY平面的圓,我想要找到滾動,俯仰和偏航將其轉換到中心位置。有任何想法嗎?在ue4中這樣做,所以我不需要代碼,只需要一個整體流程。從中心獲得圓的旋轉

+0

嗨!你有沒有想過在http://math.stackexchange.com/上提問? – MattAllegro

回答

0

你想要的不是你的「滾動,俯仰,偏航」系統,而是一個球形極座標旋轉。在座標軸的參照系而不是圓的參照系中思考更容易。

圖片說明: enter image description here

距離軸:

enter image description here

座標:

enter image description here; enter image description here; enter image description here

而得到的角度:

enter image description here; enter image description here

步驟:

  1. 通過enter image description here
  2. 圍繞由enter image description here
  3. 繞Y軸轉換在正Z方向上的圓(在順時針方向沿它看時) Z軸(與上述類似)enter image description here

需要的旋轉矩陣:https://en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions