数学の質問です。3次元の座標上に、点A(a,b,c)があります。原点から点Aまでの距離は2000です。

点Aを、x軸を中心にRX°、y軸を中心にRY°、Z軸を中心にRZ°回転させた場合、新しい点B(x,y,z)の座標を、a,b,c,RX,RY,RZを用いて表してください。

答えは必須、過程も完結に説明してください。

回答の条件
  • 1人2回まで
  • 登録:
  • 終了:2008/01/31 09:35:54
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

回答2件)

id:kosuke2020 No.1

回答回数73ベストアンサー獲得回数8

ポイント30pt

座標系を右手系として、回転方向も右ねじ方向であるとする。

まず、x軸を中心に回転させる場合、点(a,b,c)は平面x=a上を動く(x座標は変化しない)ので、平面x=aにx軸との交点を原点とするyz座標系を導入すると2次元の回転で表現することができる。回転後の座標を(a,bx,cx)とすると、

{\(\array{\\{b_x}\\{c_x}}\)={\(\array{\\{\cos(RX)}\quad{-\sin(RX)}\\{\sin(RX)}\quad{\cos(RX)}}\)\(\array{\\{b}\\{c}}\)=\(\array{\\{b\cos(RX)-c\sin(RX)}\\{b\sin(RX)+c\cos(RX)}}\)

となるので、同様に点(a,bx,cx)をy軸を中心にRY回転させた座標を(ay,bx,cxy)、点(ay,bx,cxy)をz軸を中心にRZ回転させた座標をB(ayz,bxz,cxy)とすると、

{\(\array{\\{c_{xy}}\\{a_y}}\)=\(\array{\\{c_x\cos(RY)-a\sin(RY)}\\{c_x\sin(RY)+a\cos(RY)}}\) ※右手系なのでz,xの順

{\(\array{\\{a_{yz}}\\{b_{xz}}}\)=\(\array{\\{a_y\cos(RZ)-b_x\sin(RZ)}\\{a_y\sin(RZ)+b_x\cos(RZ)}}\)

以上より、

B=\(\array{\\{a_{yz}}\\{b_{xz}}\\{c_{xy}}}\)=\(\array{\\{a_y\cos(RZ)-b_x\sin(RZ)}\\{a_y\sin(RZ)+b_x\cos(RZ)}\\{a\sin(RY)+c_x\cos(RY)}}\)

=\(\array{\\{\{c_x\sin(RY)+a\cos(RY)\}\cos(RZ)-b_x\sin(RZ)}}\\{\{c_x\sin(RY)+a\cos(RY))\sin(RZ)\}+b_x\cos(RZ)}\\{a\sin(RY)+c_x\cos(RY)}\)

=\(\array{\\{\[\{b\sin(RX)+c\cos(RX)}\}\sin(RY)+a\cos(RY)\]\cos(RZ)-\{b\cos(RX)-c\sin(RX)\}\sin(RZ)}\\{\[\{b\sin(RX)+c\cos(RX)}\}\sin(RY)+a\cos(RY)\]\sin(RZ)+\{b\cos(RX)-c\sin(RX)\}\cos(RZ)}\\{a\sin(RY)+\{b\sin(RX)+c\cos(RX)\}\cos(RY)}\)

=\(\array{\\{b\sin(RX)\sin(RY)\cos(RZ)+c\cos(RX)\sin(RY)\cos(RZ)+a\cos(RY)\cos(RZ)-b\cos(RX)\sin(RZ)+c\sin(RX)\sin(RZ)}\\{b\sin(RX)\sin(RY)\sin(RZ)+c\cos(RX)\sin(RY)\sin(RZ)+a\cos(RY)\sin(RZ)+b\cos(RX)\cos(RZ)-c\sin(RX)\cos(RZ)}\\{a\sin(RY)+b\sin(RX)cos(RY)+c\cos(RX)\cos(RY)}\)

=\(\array{\\{a\cos(RY)\cos(RZ)+b\{\sin(RX)\sin(RY)\cos(RZ)-\cos(RX)\sin(RZ)\}+c\{\cos(RX)\sin(RY)\cos(RZ)+\sin(RX)\sin(RZ)\}}\\{a\cos(RY)\cos(RZ)+b\{\sin(RX)\sin(RY)\cos(RZ)+\cos(RX)\sin(RZ)\}+c\{\cos(RX)\sin(RY)\cos(RZ)-\sin(RX)\sin(RZ)\}}\\{a\sin(RY)+b\sin(RX)cos(RY)+c\cos(RX)\cos(RY)}\)

以上ですが……途中間違えてるかもしれないので、あってるか確かめてみます。すいません。

id:irhnhhtn

ありがとうございます。

あっているかはちょっとすぐに分からないので自分の方でも確認してみます。

あと、できれば解は因数分解(?)とか定理とかで置き換えて、できるだけシンプルに変形してもらえるとうれしいです。

(できるかもわかりませんが・・・)

2008/01/29 21:33:56
id:Rec No.2

回答回数10ベストアンサー獲得回数3

ポイント40pt

座標変換には回転行列を使いましょう。

x軸周りの回転は

\left(\begin{array}1&0&0\\0&\cos RX&-\sin RX\\0&\sin RX&\cos RX\\\end{array}\right)

y軸周りの回転は

\left(\begin{array}\cos RY&0&\sin RY\\0&1&0\\-\sin RX&0&\cos RX\\\end{array}\right)

z軸周りの回転は

\left(\begin{array}\cos RZ&-\sin RZ&0\\\sin RZ&\cos RZ&0\\0&0&1\end{array}\right)

となってます。 これらを、(a,b,c)に作用させます。まずx軸周りの回転は

\left(\begin{array}1&0&0\\0&\cos RX&-\sin RX\\0&\sin RX&\cos RX\\\end{array}\right)\left(\begin{array}a\\b\\c\end{array}\right)=\left(\begin{array}a\\b\cos RX-c\sin RX\\b\sin RX+c\cos RZ\end{array}\right)

次にy軸周りの回転は

\left(\begin{array}\cos RY&0&\sin RY\\0&1&0\\-\sin RY&0&\cos RY\end{array}\right) \left(\begin{array}a\\b\cos RX-c\sin RX\\b\sin RX+c\cos RZ\end{array}\right)=\left(\begin{array}a\cos RY+\sin RY(b\cos RX+c\sin RX)\\b\cos RX-c\sin RX\\-a\sin RY+\cos RY(b\cos RX+c\sin RX)\end{array}\right)

さらにz軸周りの回転は

\left(\begin{array}\cos RZ&-\sin RZ&0\\\sin RZ&\cos RZ&0\\0&0&1\end{array}\right)\left(\begin{array}a\cos RY+\sin RY(b\cos RX+c\sin RX)\\b\cos RX-c\sin RX\\-a\sin RY+\cos RY(b\cos RX+c\sin RX)\end{array}\right)=\left(\begin{array}\cos RZ(a\cos RY+\sin RY(b\cos RX+c\sin RX))-\sin RZ(b\cos RX-c\sin RX\\\sin RZ(a\cos RY+\sin RY(b\cos RX+c\sin RX))+\cos RZ(b\cos RX-c\sin RX)\\-a\sin RY+\cos RY(b\cos RX+c\sin RX)\end{array}\right)

となります。従って、

\left(\begin{array}x\\y\\z\end{array}\right)=\left(\begin{array}\cos RZ(a\cos RY+\sin RY(b\cos RX+c\sin RX))-\sin RZ(b\cos RX-c\sin RX\\\sin RZ(a\cos RY+\sin RY(b\cos RX+c\sin RX))+\cos RZ(b\cos RX-c\sin RX)\\-a\sin RY+\cos RY(b\cos RX+c\sin RX)\end{array}\right)

id:irhnhhtn

ありがとうございます。

回転行列ですか。ちょっと思い出せませんが調べてじっくり確認してみます。

2008/01/29 21:36:28
  • id:irhnhhtn
    Recさんの回答で、解がzだけ式が短いのですが、
    xとyも何か定理(?)を使って同じような式にまとめられませんでしょうか???
  • id:kosuke2020
    すいません、やはり一部回答が間違ってましたのでコメントにて連絡させていただきます。
    コメント欄ではtex記法が使えないので、この内容をコピーしてはてなブログにペーストして数式を見やすくしてみてもらえればと思います。

    間違っていました…すいません。間違いを訂正して再度回答させてもらいます。

    [tex:B=\(\array{\\{a_{yz}}\\{b_{xz}}\\{c_{xy}}}\)=\(\array{\\{a_y\cos(RZ^{\circ})-b_x\sin(RZ^{\circ})}\\{a_y\sin(RZ^{\circ})+b_x\cos(RZ^{\circ})}\\{-a\sin(RY^{\circ})+c_x\cos(RY^{\circ})}}\)]
    (z座標のsinの項のマイナスが抜けてました)
    [tex:=\(\array{\\{\{c_x\sin(RY^{\circ})+a\cos(RY^{\circ})\}\cos(RZ^{\circ})-b_x\sin(RZ^{\circ})}}\\{\{c_x\sin(RY^{\circ})+a\cos(RY^{\circ}))\sin(RZ^{\circ})\}+b_x\cos(RZ^{\circ})}\\{-a\sin(RY^{\circ})+c_x\cos(RY^{\circ})}\)]
    [tex:=\(\array{\\{\[\{b\sin(RX^{\circ})+c\cos(RX^{\circ})}\}\sin(RY^{\circ})+a\cos(RY^{\circ})\]\cos(RZ^{\circ})-\{b\cos(RX^{\circ})-c\sin(RX^{\circ})\}\sin(RZ^{\circ})}\\{\[\{b\sin(RX^{\circ})+c\cos(RX^{\circ})}\}\sin(RY^{\circ})+a\cos(RY^{\circ})\]\sin(RZ^{\circ})+\{b\cos(RX^{\circ})-c\sin(RX^{\circ})\}\cos(RZ^{\circ})}\\{-a\sin(RY^{\circ})+\{b\sin(RX^{\circ})+c\cos(RX^{\circ})\}\cos(RY^{\circ})}\)]
    [tex:=\(\array{\\{b\sin(RX^{\circ})\sin(RY^{\circ})\cos(RZ^{\circ})+c\cos(RX^{\circ})\sin(RY^{\circ})\cos(RZ^{\circ})+a\cos(RY^{\circ})\cos(RZ^{\circ})-b\cos(RX^{\circ})\sin(RZ^{\circ})+c\sin(RX^{\circ})\sin(RZ^{\circ})}\\{b\sin(RX^{\circ})\sin(RY^{\circ})\sin(RZ^{\circ})+c\cos(RX^{\circ})\sin(RY^{\circ})\sin(RZ^{\circ})+a\cos(RY^{\circ})\sin(RZ^{\circ})+b\cos(RX^{\circ})\cos(RZ^{\circ})-c\sin(RX^{\circ})\cos(RZ^{\circ})}\\{-a\sin(RY^{\circ})+b\sin(RX^{\circ})cos(RY^{\circ})+c\cos(RX^{\circ})\cos(RY^{\circ})}\)]
    [tex:=\(\array{\\{a\cos(RY^{\circ})\cos(RZ^{\circ})+b\{\sin(RX^{\circ})\sin(RY^{\circ})\cos(RZ^{\circ})-\cos(RX^{\circ})\sin(RZ^{\circ})\}+c\{\cos(RX^{\circ})\sin(RY^{\circ})\cos(RZ^{\circ})+\sin(RX^{\circ})\sin(RZ^{\circ})\}}\\{a\cos(RY^{\circ})\sin(RZ^{\circ})+b\{\sin(RX^{\circ})\sin(RY^{\circ})\sin(RZ^{\circ})+\cos(RX^{\circ})\cos(RZ^{\circ})\}+c\{\cos(RX^{\circ})\sin(RY^{\circ})\sin(RZ^{\circ})-\sin(RX^{\circ})\cos(RZ^{\circ})\}}\\{-a\sin(RY^{\circ})+b\sin(RX^{\circ})cos(RY^{\circ})+c\cos(RX^{\circ})\cos(RY^{\circ})}\)]
    (y座標の[tex:\cos(RZ^{\circ})]が[tex:\sin(RZ^{\circ})]に、[tex:\sin(RZ^{\circ})]が[tex:\cos(RZ^{\circ})]に入れ替わってました。)
    以上で正しい解になっていると思います。


    ここで、[tex:\cos(\theta)=\mathcal{C}\theta]、[tex:\sin(\theta)=\mathcal{S}\theta]、[tex:(\array{\\RX^{\circ},&RY^{\circ},&RZ^{\circ}})=(\array{\\{\theta}_{x},&{\theta}_{y},&{\theta}_z})]とおくと、
    [tex:B=\(\array{\\{a\mathcal{C}{\theta}_{y}\mathcal{C}{\theta}_{z}+b\{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}-\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{z}\}+c\{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}+\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{z}\}}\\{a\mathcal{C}{\theta}_{y}\mathcal{S}{\theta}_{z}+b\{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}+\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{z}\}+c\{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}-\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{z}\}}\\{-a\mathcal{S}{\theta}_{y}+b\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{y}+c\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{y}}\)]
    [tex:=\(\array{\\{\mathcal{C}{\theta}_{y}\mathcal{C}{\theta}_{z}}&{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}-\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{z}}&{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}+\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{z}}\\{\mathcal{C}{\theta}_{y}\mathcal{S}{\theta}_{z}}&{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}-\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{z}}&{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}+\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{z}}\\{-\mathcal{S}{\theta}_{y}}&{\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{y}}&{\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{y}}\)\(\array{4$a\\4$b\\4$c}\)=R\(\array{4$a\\4$b\\4$c}\)]

    となり、点(a,b,c)をx軸を中心にRX°、y軸を中心にRY°、z軸を中心にRZ°回転させる変換は3行3列の行列[tex:R]で表現することができます。
    この3行3列の行列はRecさんの回答されていたxyz軸周りに回転するときの変換行列を掛け合わせたものになると思います。そして、一番式を簡潔に
    表現しようとすると、この行列形式になるかと思います。(z座標だけ式が短いのは、一番最後にz軸について回転させたためでしょう。)
  • id:hkrhr1
     失礼かと思いますが、 irhnhhtnさんは三次元座標をほとんどご存じないようですね。
     
    三次元座標では、回転する順序が変わると答えも変わってしまいます。二次元座標系とは異なります。つまり、公式などあるようで(もっともらしく3x3の行列変換式)、実は無いのです。
     
    ・アークタンジェント(arctangent:arctan,atan,etc.)をうまく用いる(知りたい角度が簡単に計算される)。
    ・結局は、二次元の座標変換式を用いる。
     
     の二つを使いながら解いていくのです(アメリカの数学者が作った三次元変換ルーチンのプログラムを解析したらそうなっていました)

    例)z方向にRZ角(ラジアン)だけ回転するには、
     1)点Aをまず、x軸上に来るようにz軸で(theta)度、回転させます。(y=0となる)
     2)XZ平面上で、点A'のx軸となす角度にRZ(ラジアン)を加えて回転させる(新しいx,zが得られる)
      これは、簡単な二次元座標の変換方式そのままです。
     3)こうして得たxz座標上の点を元の位置、つまり、z軸で(-theta)度回転して完成です(zは新しいzのまま)
      この三段階を紙に書いてイメージをはっきりさせて下さい。
      はっきりできたら、回転の順序で座標が変わってしまう事も理解できるでしょう。
    ---
    theta = arctan(b/a) で与えられます。

     以上、三次元空間の回転の具体的方法を示しました。
     
     
     これで、お分かりにならない時は、まず、回転する順序を良く考えたあとで、数学の三次元空間の先生にちゃんと授業料を払ってお聞きになると良いでしょう。はてな70ポイントで質問する範囲を逸脱しています。
     
  • id:irhnhhtn
    >kosuke2020さん
    わざわざありがとうございます。
    じっくり確認してみます。
    ポイント多めに設定しますね。

    >hkrhr1さん
    回転する順序で座標変わるんですね。
    ちなみに勉強の為ではなく、単に答えが知りたかっただけなので、
    詳しく調べる前に質問してしました。

  • id:kosuke2020
    再度すいません…またy座標の符号を間違ってました。間違った部分を直したものを上げなおします。
    ややこしくしてしまってすいません。

    [tex:B=\(\array{\\{a\mathcal{C}{\theta}_{y}\mathcal{C}{\theta}_{z}+b\{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}-\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{z}\}+c\{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}+\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{z}\}}\\{a\mathcal{C}{\theta}_{y}\mathcal{S}{\theta}_{z}+b\{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}+\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{z}\}+c\{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}-\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{z}\}}\\{-a\mathcal{S}{\theta}_{y}+b\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{y}+c\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{y}}\)]
    [tex:=\(\array{\\{\mathcal{C}{\theta}_{y}\mathcal{C}{\theta}_{z}}&{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}-\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{z}}&{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{C}{\theta}_{z}+\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{z}}\\{\mathcal{C}{\theta}_{y}\mathcal{S}{\theta}_{z}}&{\mathcal{S}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}+\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{z}}&{\mathcal{C}{\theta}_{x}\mathcal{S}{\theta}_{y}\mathcal{S}{\theta}_{z}-\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{z}}\\{-\mathcal{S}{\theta}_{y}}&{\mathcal{S}{\theta}_{x}\mathcal{C}{\theta}_{y}}&{\mathcal{C}{\theta}_{x}\mathcal{C}{\theta}_{y}}\)\(\array{4$a\\4$b\\4$c}\)=R\(\array{4$a\\4$b\\4$c}\)]

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません