To solve this one, the three elements you need to determine are the axis, angle
of rotation and the sign. In other words, which direction you're rotating. The
green axis is the one we want to rotate around, and so this is the y axis. For
the angle of rotation, there are 360 degrees in a circle. We want to rotate 2
12ths of the way around the circle. So that's 60 degrees. We also need to rotate
in a negative direction, since the positive direction is counter clockwise. So
the sign is negative here. All this information is encapsulated in this line of
code, y rotation, negative 60 degrees. There's more than one solution to this
problem. Since we can't tell which end is which. We could instead rotate 120
degrees counter clockwise and get the same answer, which would let us put a
positive angle.
この問題を解くにあたって
定義すべき項目は3つあります
軸、回転角、そして
どの方向に回転するかを示す符合です
緑色の軸回りに回転させたいので
ここはy軸となります
次に回転角について考えます
まず円は1周で360度です
回転したいのは12分の2周 つまり60度になります
また負の方向に回転します
正の方向では左回りになるからです
従ってここは負の符号です
これらの情報をすべてコードに記述します
回転はy軸回りに-60度です
ただしこの問題には別の解もあります
針のどちらの端が頭かという区別ができないため
左回りに120度回転しても結果は同じです
その場合の回転は
正の方向になります
要解決這個問題,你要找出以下三個元素:
旋轉軸、角度、正負號,即旋轉方向
我們想要用綠色軸旋轉,所以是 Y 軸
旋轉角度而言,圓有 360 度,而我們要旋轉 2 / 12 個圓
所以是 60 度
然後要往負的方向旋轉因為正的是逆時針,所以這裡是負號
所有資訊都被寫進這段程式
Y 軸旋轉,-60 度
這個作業有一個以上的答案,因為兩端看起來一樣
我們也能逆時針轉 120 度得到一樣的答案
這裡我們的角度是正的