Re: Solve & RotationMatrix
- To: mathgroup at smc.vnet.net
- Subject: [mg76082] Re: Solve & RotationMatrix
- From: CKWong <CKWong.P at gmail.com>
- Date: Wed, 16 May 2007 05:22:14 -0400 (EDT)
- References: <f21g0q$7d6$1@smc.vnet.net><f23qq6$oa3$1@smc.vnet.net>
I've looked again at your algorithm & found that it was more
incomplete than I thought.
The following is a version that'll give you the answer =A3\ = 3=A3k/4, =A3] 0, A3^ = 0. The formatting may seem horrible. Just copy it to mathematica and run
it.
\!\(\*
RowBox[{\(=A3\ =. ; =A3] =. ; =A3^ =. ;\), "\n", \(VectX = {1, 0,
0}; \), "\n", \(VectY = {0, 1,
0}; \), "\n", \(VectZ = {0, 0, 1}; \), "\n", "\
[IndentingNewLine]",
RowBox[{
RowBox[{"RotX", "=",
RowBox[{"(", GridBox[{
{"1", "0", "0"},
{"0", \(Cos[=A3\]\), \(-Sin[=A3\]\)},
{"0", \(Sin[=A3\]\), \(Cos[=A3\]\)}
}], ")"}]}], ";"}], "\n",
RowBox[{
RowBox[{"RotY", "=",
RowBox[{"(", GridBox[{
{\(Cos[=A3]]\), "0", \(Sin[=A3]]\)},
{"0", "1", "0"},
{\(-Sin[=A3]]\), "0", \(Cos[=A3]]\)}
}], ")"}]}], ";"}], "\n",
RowBox[{
RowBox[{"RotZ", "=",
RowBox[{"(", GridBox[{
{\(Cos[=A3^]\), \(-Sin[=A3^]\), "0"},
{\(Sin[=A3^]\), \(Cos[=A3^]\), "0"},
{"0", "0", "1"}
}], ")
"}]}], ";"}], "\n", \(Rotation = RotX . RotY . RotZ; \), "\n
", \(PtO = {0, 0,
0}; \), "\n
", \(PtA = {1, 0, 0}; \), "\n
", \(PtB = {0, 1, 1};\), "\n", \(VectN = \((
PtA - PtO)\)\[Cross]\((PtB - PtO)\);\), "\n
", \(VectN = VectN\/\@\(VectN . VectN\)\),
"\n", \(eq = \(VectN == Rotation . VectY // Thread\) // Simplify
\), "\n", \
\(eqS = eq /. {=A3] -> 0, =A3^ -> 0} // Simplify\), "\n", \(Solve[eqS, {=A3\}]
\)}]\)