Jason McKesson avatar Jason McKesson committed 0794d2b

Tut08: Text complete, equations complete.
Added some quaternion functions to GLM.

Comments (0)

Files changed (20)

Documents/Positioning/AngleAxisRotationMatrix.mathml

             <mtd>
               <mtext>Angle</mtext>
               <mo>=</mo>
-              <mi>&#x03D1;</mi>
+              <mi>&#x03B8;</mi>
             </mtd>
           </mtr>
           <mtr>
               <mi>cos</mi><mo>&#x2061;</mo>
               <mfenced open="(" close=")" separators=",">
                 <mrow>
-                  <mi>&#x03D1;</mi>
+                  <mi>&#x03B8;</mi>
                 </mrow>
               </mfenced>
             </mtd>
               <mi>sin</mi><mo>&#x2061;</mo>
               <mfenced open="(" close=")" separators=",">
                 <mrow>
-                  <mi>&#x03D1;</mi>
+                  <mi>&#x03B8;</mi>
                 </mrow>
               </mfenced>
             </mtd>
               <mi>cos</mi><mo>&#x2061;</mo>
               <mfenced open="(" close=")" separators=",">
                 <mrow>
-                  <mi>&#x03D1;</mi>
+                  <mi>&#x03B8;</mi>
                 </mrow>
               </mfenced>
             </mtd>
               <mi>sin</mi><mo>&#x2061;</mo>
               <mfenced open="(" close=")" separators=",">
                 <mrow>
-                  <mi>&#x03D1;</mi>
+                  <mi>&#x03B8;</mi>
                 </mrow>
               </mfenced>
             </mtd>
Add a comment to this file

Documents/Positioning/AngleAxisRotationMatrix.svg

Old
Old image
New
New image
 <?xml version="1.0" encoding="utf-8"?>
-<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="114.418687pt" width="242.365827pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -61.193718 242.365827 114.418687"><svg:metadata><svgmath:metrics top="114.418686896" axis="57.2093434479" baseline="53.2249684479" bottom="0.0"/></svg:metadata><svg:g transform="translate(0.000000, -3.984375)"><svg:g transform="translate(42.095476, -35.471062)"><svg:g transform="translate(0.000000, -13.382813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="11.334961" font-family="Times New Roman" fill="black">Axis</svg:text><svg:g transform="translate(28.003262, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(38.104176, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(9.720703, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(16.720699, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(22.984371, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(29.984367, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(35.046867, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(97.136457, -13.382813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="14.663086" font-family="Times New Roman" fill="black">Angle</svg:text><svg:g transform="translate(34.659512, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(44.760426, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.944336" font-family="Times New Roman" font-style="italic" fill="black">ϑ</svg:text></svg:g></svg:g><svg:g transform="translate(11.696285, 2.929688)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text><svg:g transform="translate(11.776695, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(21.877609, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.998047" font-family="Times New Roman" fill="black">cos</svg:text></svg:g><svg:g transform="translate(37.873703, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(39.873707, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.944336" font-family="Times New Roman" font-style="italic" fill="black">ϑ</svg:text></svg:g><svg:g transform="translate(9.884766, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(97.549543, 2.929688)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text><svg:g transform="translate(9.837242, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(19.938156, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(33.942063, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(35.942067, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.944336" font-family="Times New Roman" font-style="italic" fill="black">ϑ</svg:text></svg:g><svg:g transform="translate(9.884766, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(1.198566, 19.195313)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(14.671227, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(24.772141, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g><svg:g transform="translate(33.438805, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(42.873047, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.998047" font-family="Times New Roman" fill="black">cos</svg:text></svg:g><svg:g transform="translate(58.869141, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(60.869145, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.944336" font-family="Times New Roman" font-style="italic" fill="black">ϑ</svg:text></svg:g><svg:g transform="translate(9.884766, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(86.747137, 19.195313)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.003906" font-family="Times New Roman" fill="black">iS</svg:text><svg:g transform="translate(13.341148, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(23.442063, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g><svg:g transform="translate(32.108727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(41.542969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(55.546875, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(57.546879, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.944336" font-family="Times New Roman" font-style="italic" fill="black">ϑ</svg:text></svg:g><svg:g transform="translate(9.884766, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g></svg:g><svg:g transform="translate(0.000000, 24.421875)"><svg:text font-size="71.680704" transform="scale(0.167409, 1)" text-anchor="middle" y="17.115168" x="11.935117" font-family="Times New Roman" fill="black">[</svg:text><svg:g transform="translate(3.996094, 0.000000)"><svg:g transform="translate(0.000000, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(5.724609, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(12.651273, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(22.085516, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(5.724609, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(32.081609, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(58.163218, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(86.552187, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(25.992836, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(35.427078, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(162.635718, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(24.791664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(34.225906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(9.806547, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(25.992836, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(35.427078, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(76.206578, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text><svg:g transform="translate(6.263672, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(13.190336, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(22.624578, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text><svg:g transform="translate(6.263672, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(32.620672, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(59.241343, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(162.635718, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(17.601563, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(25.330727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(34.764969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(9.806547, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(24.791664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(34.225906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(86.552187, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(17.601563, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(25.330727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(34.764969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(153.491281, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text><svg:g transform="translate(5.062500, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(11.989164, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(21.423406, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text><svg:g transform="translate(5.062500, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(31.419500, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(56.839000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(30.303289, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(107.048929, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(183.132460, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(228.373640, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g></svg:g><svg:g transform="translate(238.369734, 0.000000)"><svg:text font-size="71.687149" transform="scale(0.167394, 1)" text-anchor="middle" y="17.116707" x="11.936190" font-family="Times New Roman" fill="black">]</svg:text></svg:g></svg:g></svg:g></svg:svg>
+<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="114.418687pt" width="242.365827pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -61.193718 242.365827 114.418687"><svg:metadata><svgmath:metrics top="114.418686896" axis="57.2093434479" baseline="53.2249684479" bottom="0.0"/></svg:metadata><svg:g transform="translate(0.000000, -3.984375)"><svg:g transform="translate(41.995867, -35.471062)"><svg:g transform="translate(0.000000, -13.382813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="11.334961" font-family="Times New Roman" fill="black">Axis</svg:text><svg:g transform="translate(28.003262, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(38.104176, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(9.720703, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(16.720699, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(22.984371, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(29.984367, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(35.046867, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(97.136457, -13.382813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="14.663086" font-family="Times New Roman" fill="black">Angle</svg:text><svg:g transform="translate(34.659512, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(44.760426, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g></svg:g><svg:g transform="translate(11.596676, 2.929688)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text><svg:g transform="translate(11.776695, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(21.877609, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.998047" font-family="Times New Roman" fill="black">cos</svg:text></svg:g><svg:g transform="translate(37.873703, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(39.873707, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(10.083984, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(97.549543, 2.929688)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text><svg:g transform="translate(9.837242, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(19.938156, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(33.942063, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(35.942067, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(10.083984, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(1.098957, 19.195313)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(14.671227, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(24.772141, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g><svg:g transform="translate(33.438805, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(42.873047, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.998047" font-family="Times New Roman" fill="black">cos</svg:text></svg:g><svg:g transform="translate(58.869141, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(60.869145, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(10.083984, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(86.747137, 19.195313)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.003906" font-family="Times New Roman" fill="black">iS</svg:text><svg:g transform="translate(13.341148, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(23.442063, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g><svg:g transform="translate(32.108727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(41.542969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(55.546875, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.000002" font-family="Times New Roman, Lucida Sans Unicode" fill="black"></svg:text></svg:g><svg:g transform="translate(57.546879, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(10.083984, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g></svg:g><svg:g transform="translate(0.000000, 24.421875)"><svg:text font-size="71.680704" transform="scale(0.167409, 1)" text-anchor="middle" y="17.115168" x="11.935117" font-family="Times New Roman" fill="black">[</svg:text><svg:g transform="translate(3.996094, 0.000000)"><svg:g transform="translate(0.000000, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(5.724609, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(12.651273, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(22.085516, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(5.724609, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(32.081609, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(58.163218, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(86.552187, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(25.992836, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(35.427078, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(162.635718, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(24.791664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(34.225906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, -21.636187)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(9.806547, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(25.992836, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(35.427078, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(76.206578, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text><svg:g transform="translate(6.263672, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(13.190336, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(22.624578, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text><svg:g transform="translate(6.263672, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(32.620672, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(59.241343, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(162.635718, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(17.601563, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(25.330727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(34.764969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, -2.527875)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(9.806547, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(17.062500, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(24.791664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(34.225906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(86.552187, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="5.668945" font-family="Times New Roman" fill="black">iC</svg:text><svg:g transform="translate(11.337891, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(17.601563, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(25.330727, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(34.764969, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(40.489578, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">S</svg:text></svg:g></svg:g><svg:g transform="translate(153.491281, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text><svg:g transform="translate(5.062500, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(11.989164, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(21.423406, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text><svg:g transform="translate(5.062500, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(31.419500, -3.984375)"><svg:text font-size="15.071794" transform="scale(0.796189, 1)" text-anchor="middle" y="3.297982" x="2.509513" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(56.839000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="4.001953" font-family="Times New Roman" font-style="italic" fill="black">C</svg:text></svg:g></svg:g><svg:g transform="translate(228.373640, 16.580437)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(30.303289, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(107.048929, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(183.132460, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(228.373640, 32.646843)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g></svg:g><svg:g transform="translate(238.369734, 0.000000)"><svg:text font-size="71.687149" transform="scale(0.167394, 1)" text-anchor="middle" y="17.116707" x="11.936190" font-family="Times New Roman" fill="black">]</svg:text></svg:g></svg:g></svg:g></svg:svg>

Documents/Positioning/AngleAxisToQuaternion.mathml

+<?xml version="1.0" encoding="utf-8"?>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
+    <mrow>
+        <mtable>
+            <mtr>
+                <mtd>
+                    <mtable>
+                        <mtr>
+                            <mtd>
+                                <mtext>Axis</mtext>
+                                <mo>=</mo>
+                                <mfenced open="(" close=")" separators=",">
+                                    <mrow>
+                                        <mi>x</mi>
+                                    </mrow>
+                                    <mrow>
+                                        <mi>y</mi>
+                                    </mrow>
+                                    <mrow>
+                                        <mi>z</mi>
+                                    </mrow>
+                                </mfenced>
+                            </mtd>
+                            <mtd>
+                                <mtext>Angle</mtext>
+                                <mo>=</mo>
+                                <mi>&#x03B8;</mi>
+                            </mtd>
+                        </mtr>
+                    </mtable>
+                </mtd>
+            </mtr>
+            <mtr>
+                <mtd>
+                    <mtext>Quaternion</mtext>
+                    <mo>=</mo>
+                    <mfenced open="[" close="]" separators=",">
+                        <mtable>
+                            <mtr>
+                                <mtd>
+                                    <mi>x</mi>
+                                    <mo>*</mo>
+                                    <mi>sin</mi>
+                                    <mfenced open="(" close=")" separators=",">
+                                        <mfrac>
+                                            <mi>&#x03B8;</mi>
+                                            <mn>2</mn>
+                                        </mfrac>
+                                    </mfenced>
+                                </mtd>
+                            </mtr>
+                            <mtr>
+                                <mtd>
+                                    <mi>y</mi>
+                                    <mo>*</mo>
+                                    <mi>sin</mi>
+                                    <mfenced open="(" close=")" separators=",">
+                                        <mfrac>
+                                            <mi>&#x03B8;</mi>
+                                            <mn>2</mn>
+                                        </mfrac>
+                                    </mfenced>
+                                </mtd>
+                            </mtr>
+                            <mtr>
+                                <mtd>
+                                    <mi>z</mi>
+                                    <mo>*</mo>
+                                    <mi>sin</mi>
+                                    <mfenced open="(" close=")" separators=",">
+                                        <mfrac>
+                                            <mi>&#x03B8;</mi>
+                                            <mn>2</mn>
+                                        </mfrac>
+                                    </mfenced>
+                                </mtd>
+                            </mtr>
+                            <mtr>
+                                <mtd>
+                                    <mi>cos</mi>
+                                    <mfenced open="(" close=")" separators=",">
+                                        <mfrac>
+                                            <mi>&#x03B8;</mi>
+                                            <mn>2</mn>
+                                        </mfrac>
+                                    </mfenced>
+                                </mtd>
+                            </mtr>
+                        </mtable>
+                    </mfenced>
+                </mtd>
+            </mtr>
+        </mtable>
+    </mrow>
+</math>
Add a comment to this file

Documents/Positioning/AngleAxisToQuaternion.svg

Added
New image
+<?xml version="1.0" encoding="utf-8"?>
+<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="92.667772pt" width="137.595453pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -50.318261 137.595453 92.667772"><svg:metadata><svgmath:metrics top="92.6677718012" axis="46.3338859006" baseline="42.3495109006" bottom="0.0"/></svg:metadata><svg:g transform="translate(0.000000, -3.984375)"><svg:g transform="translate(0.000000, -40.861230)"><svg:g transform="translate(0.000000, 2.882813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="11.334961" font-family="Times New Roman" fill="black">Axis</svg:text><svg:g transform="translate(28.003262, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(38.104176, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(9.720703, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(16.720699, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(22.984371, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.500000" font-family="Times New Roman" fill="black">,</svg:text></svg:g><svg:g transform="translate(29.984367, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(35.046867, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.960938" x="1.998047" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(86.747137, 2.882813)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="14.663086" font-family="Times New Roman" fill="black">Angle</svg:text><svg:g transform="translate(34.659512, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(44.760426, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.947266" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(7.630332, 12.140625)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="26.991211" font-family="Times New Roman" fill="black">Quaternion</svg:text><svg:g transform="translate(59.315762, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(69.416676, -3.984375)"><svg:text font-size="83.537914" transform="scale(0.143647, 1)" text-anchor="middle" y="19.946309" x="13.909389" font-family="Times New Roman" fill="black">[</svg:text><svg:g transform="translate(3.996094, 0.000000)"><svg:g transform="translate(0.269531, -26.578066)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(7.724613, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(15.724617, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(29.728524, -3.984375)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">(</svg:text><svg:g transform="translate(4.582031, 0.000000)"><svg:g transform="translate(0.585938, -1.699453)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.092559" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(0.617139, 7.357266)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:line stroke-width="0.585938" x1="0.000000" x2="5.494277" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" y2="0.000000" fill="none"/></svg:g><svg:g transform="translate(10.662246, 0.000000)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(0.000000, -6.147451)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.600586" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text><svg:g transform="translate(8.263676, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(16.263680, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(30.267586, -3.984375)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">(</svg:text><svg:g transform="translate(4.582031, 0.000000)"><svg:g transform="translate(0.585938, -1.699453)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.092559" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(0.617139, 7.357266)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:line stroke-width="0.585938" x1="0.000000" x2="5.494277" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" y2="0.000000" fill="none"/></svg:g><svg:g transform="translate(10.662246, 0.000000)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(0.600586, 14.283164)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.668945" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text><svg:g transform="translate(7.062504, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(15.062508, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.001953" font-family="Times New Roman" fill="black">sin</svg:text></svg:g><svg:g transform="translate(29.066414, -3.984375)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">(</svg:text><svg:g transform="translate(4.582031, 0.000000)"><svg:g transform="translate(0.585938, -1.699453)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.092559" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(0.617139, 7.357266)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:line stroke-width="0.585938" x1="0.000000" x2="5.494277" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" y2="0.000000" fill="none"/></svg:g><svg:g transform="translate(10.662246, 0.000000)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(7.135746, 34.713779)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="7.998047" font-family="Times New Roman" fill="black">cos</svg:text><svg:g transform="translate(15.996094, -3.984375)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">(</svg:text><svg:g transform="translate(4.582031, 0.000000)"><svg:g transform="translate(0.585938, -1.699453)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.092559" font-family="Times New Roman" font-style="italic" fill="black">θ</svg:text></svg:g><svg:g transform="translate(0.617139, 7.357266)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:line stroke-width="0.585938" x1="0.000000" x2="5.494277" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" y2="0.000000" fill="none"/></svg:g><svg:g transform="translate(10.662246, 0.000000)"><svg:text font-size="16.455209" transform="scale(0.729252, 1)" text-anchor="middle" y="3.929003" x="2.739857" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g></svg:g></svg:g><svg:g transform="translate(48.922020, 0.000000)"><svg:text font-size="83.544359" transform="scale(0.143636, 1)" text-anchor="middle" y="19.947847" x="13.910462" font-family="Times New Roman" fill="black">]</svg:text></svg:g></svg:g></svg:g></svg:g></svg:svg>
Add a comment to this file

Documents/Positioning/Camera Relative.png

Added
New image
Add a comment to this file

Documents/Positioning/In Gimbal Lock.png

Old
Old image
New
New image
Add a comment to this file

Documents/Positioning/Quaternion YPR.png

Added
New image

Documents/Positioning/QuaternionMultiplication.mathml

+<?xml version="1.0" encoding="utf-8"?>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
+    <mrow>
+        <mi>a</mi>
+        <mo>*</mo>
+        <mi>b</mi>
+        <mo>=</mo>
+        <mfenced open="[" close="]" separators=",">
+            <mtable>
+                <mtr>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>w</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                </mtr>
+                <mtr>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>w</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                </mtr>
+                <mtr>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>w</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>+</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                </mtr>
+                <mtr>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>w</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mo>-</mo>
+                    </mtd>
+                    <mtd>
+                        <msub>
+                            <mi>a</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>*</mo>
+                        <msub>
+                            <mi>b</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                </mtr>
+            </mtable>
+        </mfenced>
+    </mrow>
+</math>
Add a comment to this file

Documents/Positioning/QuaternionMultiplication.svg

Added
New image
+<?xml version="1.0" encoding="utf-8"?>
+<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="67.519219pt" width="248.230833pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -37.743984 248.230833 67.519219"><svg:metadata><svgmath:metrics top="67.51921875" axis="33.759609375" baseline="29.775234375" bottom="0.0"/></svg:metadata><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(8.000004, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(16.000008, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text></svg:g><svg:g transform="translate(25.333344, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">=</svg:text></svg:g><svg:g transform="translate(35.434258, -3.984375)"><svg:text font-size="73.819205" transform="scale(0.162559, 1)" text-anchor="middle" y="17.625777" x="12.291186" font-family="Times New Roman" fill="black">[</svg:text><svg:g transform="translate(3.996094, 0.000000)"><svg:g transform="translate(0.809150, -25.427578)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g><svg:g transform="translate(13.682777, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(21.682781, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(42.965555, -29.411953)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(59.524500, -25.427578)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(12.064477, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.064481, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(101.063121, -29.411953)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(117.857116, -25.427578)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(12.447211, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.447215, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(157.925122, -29.411953)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(174.527749, -25.427578)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(11.594379, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(19.594383, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(0.617783, -7.205977)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g><svg:g transform="translate(13.682777, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(21.682781, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(42.965555, -11.190352)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(59.333133, -7.205977)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(12.447211, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.447215, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(101.063121, -11.190352)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(118.048483, -7.205977)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(11.594379, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(19.594383, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(157.925122, -11.190352)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(174.719116, -7.205977)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(12.064477, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.064481, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(1.044199, 11.015625)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g><svg:g transform="translate(13.682777, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(21.682781, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(42.965555, 7.031250)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(59.759549, 11.015625)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(11.594379, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(19.594383, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(101.063121, 7.031250)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(117.622067, 11.015625)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(12.064477, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.064481, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(157.925122, 7.031250)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(174.292700, 11.015625)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(12.447211, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.447215, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(0.000000, 29.237227)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g><svg:g transform="translate(13.682777, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(21.682781, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(42.965555, 25.252852)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(60.333651, 29.237227)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(12.064477, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.064481, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(101.063121, 25.252852)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(117.430700, 29.237227)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g><svg:g transform="translate(12.447211, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(20.447215, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(157.925122, 25.252852)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(174.954165, 29.237227)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">a</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g><svg:g transform="translate(11.594379, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.000000" font-family="Times New Roman" fill="black">*</svg:text></svg:g><svg:g transform="translate(19.594383, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">b</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g></svg:g><svg:g transform="translate(208.800481, 0.000000)"><svg:text font-size="73.825650" transform="scale(0.162545, 1)" text-anchor="middle" y="17.627316" x="12.292259" font-family="Times New Roman" fill="black">]</svg:text></svg:g></svg:g></svg:svg>

Documents/Positioning/QuaternionToMatrix.mathml

+<?xml version="1.0" encoding="utf-8"?>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
+    <mrow>
+        <mfenced open="[" close="]" separators=",">
+            <mtable>
+                <mtr>
+                    <mtd>
+                        <mn>1</mn>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>+</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                </mtr>
+
+                <mtr>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <mo>+</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>1</mn>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                </mtr>
+                <mtr>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>z</mi>
+                        </msub>
+                        <mo>+</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>w</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>1</mn>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>x</mi>
+                        </msub>
+                        <mo>-</mo>
+                        <mn>2</mn>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                        <msub>
+                            <mi>q</mi>
+                            <mi>y</mi>
+                        </msub>
+                    </mtd>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                </mtr>
+                <mtr>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                    <mtd>
+                        <mn>0</mn>
+                    </mtd>
+                    <mtd>
+                        <mn>1</mn>
+                    </mtd>
+                </mtr>
+            </mtable>
+        </mfenced>
+    </mrow>
+</math>
Add a comment to this file

Documents/Positioning/QuaternionToMatrix.svg

Added
New image
+<?xml version="1.0" encoding="utf-8"?>
+<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="62.246836pt" width="289.821843pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -35.107793 289.821843 62.246836"><svg:metadata><svgmath:metrics top="62.2468359375" axis="31.1234179687" baseline="27.1390429687" bottom="0.0"/></svg:metadata><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="68.020150" transform="scale(0.176418, 1)" text-anchor="middle" y="16.241139" x="11.325621" font-family="Times New Roman" fill="black">[</svg:text><svg:g transform="translate(3.996094, 0.000000)"><svg:g transform="translate(0.000000, -23.014043)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(24.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(34.548113, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(47.661984, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(57.096226, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(63.096226, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(72.690601, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(99.699863, -23.014043)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(16.064473, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(29.178344, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(38.612586, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(44.612586, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(56.295359, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(191.672203, -23.014043)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(16.064473, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(28.325512, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(37.759754, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(43.759754, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(55.442527, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(275.829656, -23.014043)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(8.197621, -5.015098)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(16.064473, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(29.178344, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(38.612586, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(44.612586, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(56.295359, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(91.884976, -5.015098)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(24.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(34.165379, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(46.896515, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(56.330758, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(62.330758, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(71.925133, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(191.672203, -5.015098)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(16.447207, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(28.708246, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(38.142488, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(44.142488, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(55.825262, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(275.829656, -5.015098)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(8.197621, 12.983848)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(16.064473, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(28.325512, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(37.759754, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(43.759754, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(55.442527, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(99.699863, 12.983848)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text><svg:g transform="translate(6.000000, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(16.447207, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.908203)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="1.894951" font-family="Times New Roman" font-style="italic" fill="black">z</svg:text></svg:g></svg:g><svg:g transform="translate(28.708246, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">+</svg:text></svg:g><svg:g transform="translate(38.142488, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(44.142488, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.841387" font-family="Times New Roman" font-style="italic" fill="black">w</svg:text></svg:g></svg:g><svg:g transform="translate(55.825262, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(183.004484, 12.983848)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text><svg:g transform="translate(8.666664, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(18.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(24.100906, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(34.165379, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 3.808359)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.173682" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g></svg:g><svg:g transform="translate(46.896515, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">−</svg:text></svg:g><svg:g transform="translate(56.330758, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">2</svg:text></svg:g><svg:g transform="translate(62.330758, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g><svg:g transform="translate(72.777965, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" font-style="italic" fill="black">q</svg:text><svg:g transform="translate(6.000000, 2.683594)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.556416" font-family="Times New Roman" font-style="italic" fill="black">y</svg:text></svg:g></svg:g></svg:g><svg:g transform="translate(275.829656, 12.983848)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(38.142488, 30.982793)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(129.644730, 30.982793)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(221.617070, 30.982793)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">0</svg:text></svg:g><svg:g transform="translate(275.829656, 30.982793)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">1</svg:text></svg:g></svg:g><svg:g transform="translate(285.825749, 0.000000)"><svg:text font-size="68.026595" transform="scale(0.176402, 1)" text-anchor="middle" y="16.242678" x="11.326694" font-family="Times New Roman" fill="black">]</svg:text></svg:g></svg:g></svg:svg>
Add a comment to this file

Documents/Positioning/Three Gimbal Array.png

Old
Old image
New
New image

Documents/Positioning/Tutorial 04.xml

     <para>Thus far, we have seen very flat things. Namely, a single triangle. Maybe the triangle
         moved around or had some colors.</para>
     <para>This tutorial is all about how to create a realistic world of objects.</para>
-    <note>
-        <title>Incoming Wall of Text</title>
-        <para>This tutorial, even moreso than some of the previous ones, is very heavy on text and
-            light on code. The actual new code introduced in this tutorial is not that much. What is
-            important here is why this is the correct code to do what we need to do. And that
-            requires a lot of text.</para>
-        <para>It also requires a lot of math and geometry. The tutorial will explain everything
-            step-by-step and in-depth, but understanding everything will exercise your math skills.
-            Even worse, the code that we deal with here is usually boilerplate code. It's the kind
-            of code that you write once and then use forever without having to go change it or
-            usually understand how it works.</para>
-        <para>These facts will tempt you to simply skip this tutorial and move on to the next.
-            However, I strongly advise you to resist that temptation. I understand that math isn't
-            the most interesting thing to most people (though to be honest, if math really bores or
-            confuses you, you may want to re-think your desire to write graphics code). But
-            understanding the concepts introduced in this tutorial is very important for
-            understanding how the most fundamental part of triangle-based scan conversion
-            works.</para>
-    </note>
     <section>
         <title>The Unreal World</title>
         <para>The <phrase role="propername">Orthographic Cube</phrase> tutorial renders a

Documents/Positioning/Tutorial 06.xml

         <para>Does it look familiar <emphasis>now</emphasis>?</para>
         <para>What this tells us is that the columns of our transformation matrices are, and have
                 <emphasis>always</emphasis> been, nothing more than the axes of a coordinate system.
-            Except for the fourth column: because the input position has a 1 in the W, it acts as an
+            Except for the fourth column; because the input position has a 1 in the W, it acts as an
             offset.</para>
         <para>Transformation ultimately means this: taking the basis vectors and origin point from
             the original coordinate system and re-expressing them relative to the destination
             OpenGL. And since we're already uploading a matrix to OpenGL for each object we render,
             this changes nothing about the overall performance characteristics of the rendering (for
             the graphics hardware).</para>
-        <para><emphasis>This</emphasis> is one of the main reasons matrices are used. You can have a
-            transformation sequence with dozens of component transformations, and yet all it takes
-            for the GPU to process this is a single vector/matrix multiplication.</para>
+        <para><emphasis>This</emphasis> is one of the main reasons matrices are used. You can build
+            an incredibly complex transformation sequence with dozens of component transformations.
+            And yet, all it takes for the GPU to use this to transform positions is a single
+            vector/matrix multiplication.</para>
         <section>
             <title>Order of Transforms</title>
             <para>As previously stated, matrix multiplication is not commutative. This means that
                 </glossdef>
             </glossentry>
             <glossentry>
-                <glossterm>inverse matrix</glossterm>
-                <glossdef>
-                    <para>The inverse matrix of the matrix M is the matrix B for which the following
-                        equation is true: <inlineequation>
-                            <mathphrase>MB = I</mathphrase>
-                        </inlineequation>, where I is the identity matrix. The inverse of M is
-                        usually denoted as M<superscript>-1</superscript>.</para>
-                </glossdef>
-            </glossentry>
-            <glossentry>
                 <glossterm>hierarchical model</glossterm>
                 <glossdef>
                     <para>Models can be conceptually composed of multiple independent pieces in a

Documents/Positioning/Tutorial 08.xml

             matrix at all, that it is an orientation matrix? We also said that forgetting this can
             come back to bite you. Well, here's likely the most common way.</para>
         <para>Normally, when dealing with orienting an object like a plane or spaceship in 3D space,
-            you want to orient it based on 3 rotations about the 3 axes. The obvious way to do this
-            is with a series of 3 rotations. This means that the program stores 3 angles, and you
-            generate a rotation matrix by creating 3 rotation matrices based on these angles and
+            you want to orient it based on 3 rotations about the 3 main axes. The obvious way to do
+            this is with a series of 3 rotations. This means that the program stores 3 angles, and
+            you generate a rotation matrix by creating 3 rotation matrices based on these angles and
             concatenating them. Indeed, the 3 angles often have special names, based on common
             flight terminology: yaw, pitch, and roll.</para>
         <para>Pitch is the rotation that raises or lowers the front of the object. Yaw is the
             </mediaobject>
         </figure>
         <para>You can control the orientation of each gimbal separately. The <keycap>w</keycap> and
-                <keycap>s</keycap> keys control the blue gimbal, the <keycap>a</keycap> and
-                <keycap>d</keycap> keys control the green gimbal, and the <keycap>q</keycap> and
-                <keycap>e</keycap> keys control the red gimbal.</para>
-        <para>With these three gimbals, you can cause the innermost gimbal (the red one) to have any
-            arbitrary orientation. That isn't the problem. The problem happens when two of the
-            gimbals are parallel with one another:</para>
+                <keycap>s</keycap> keys control the outer gimbal, the <keycap>a</keycap> and
+                <keycap>d</keycap> keys control the middle gimbal, and the <keycap>q</keycap> and
+                <keycap>e</keycap> keys control the inner gimbal. If you just want to see (and
+            affect) the orientation of the ship, press the <keycap>SpaceBar</keycap> to toggle
+            drawing the gimbal rings.</para>
+        <para>The first thing you discover when attempting to use the gimbals to orient the ship is
+            that the yaw, pitch, and roll controls of the gimbal change each time you move one of
+            them. That is, when the gimbal arrangement is in the original position, the outer gimbal
+            controls the pitch. But if you move the middle gimbal, it no longer controls
+                <emphasis>only</emphasis> the pitch. Orienting the ship is very unintuitive.</para>
+        <para>The bigger is what happens when two of the gimbals are parallel with one
+            another:</para>
         <figure>
             <title>Parallel Gimbals</title>
             <mediaobject>
             angles and orient the object in a particular direction. In a flight-simulation game, the
             player would have controls that would change their yaw, pitch, and roll. However, look
             at this picture.</para>
-        <para>The player's theoretical ship is pointed in the direction of the center gimbal's
-            plane. Given the controls you have here, can you cause the center gimbal to rotate
-            around the axis that it is facing? No. You can't even do this somewhat; you can only
-            rotate it in two directions. But we have three gimbals, which means we should have three
-            axes of rotation. Why can't we rotate the red gimbal in the Z (forward) axis?</para>
-        <para>Because the outer and inner gimbals are now rotating about the <emphasis>same
-                axis</emphasis>. Which means you really only have two gimbals to manipulate in order
-            to orient the red gimbal. And 3D orientation cannot be fully controlled with only 2
-            axial rotations, with only 2 gimbals.</para>
+        <para>Given the controls of these gimbals, can you cause the object to pitch up and down?
+            That is, move its nose up and down from where it is currently? Only slightly; you can
+            use the middle gimbal, which has a bit of pitch rotation. But that isn't much.</para>
+        <para>The reason we don't have as much freedom to orient the object is because the outer and
+            inner gimbals are now rotating about the <emphasis>same axis</emphasis>. Which means you
+            really only have two gimbals to manipulate in order to orient the red gimbal. And 3D
+            orientation cannot be fully controlled with only 2 axial rotations, with only 2
+            gimbals.</para>
         <para>When gimbals are in such a position, you have what is known as <glossterm>gimbal
                 lock</glossterm>; you have locked one of the gimbals to another, and now both cause
             the same effect.</para>
         <section>
-            <title>Complex Mesh Space</title>
-            <para>The way this tutorial renders each gimbal serves as an object lesson in the use of
-                mesh space. The gimbals are composed of 6 pieces, each of which ultimately derives
-                from a simple 3D cube who's sides are of unit length. The cube is scaled and
-                translated to form the rectangular prisms used to build each the gimbal.</para>
-            <para>The <function>DrawGimbal</function> function takes a matrix stack, an axis (one of
-                the three kinds of gimbals), a size for the gimbal, and a color. The width and
-                height of a gimbal are the same, so this code only takes a single size.</para>
-            <para>There is ultimately only one gimbal <quote>mesh</quote>: the difference between
-                them is what their base orientation is. That is computed in this function:</para>
+            <title>Rendering</title>
+            <para>Before we find a solution to the problem, let's review the code. Most of it is
+                nothing you haven't seen elsewhere, so this will be quick.</para>
+            <para>There is no explicit camera matrix set up for this example; it is too simple for
+                that. The three gimbals are loaded from mesh files as we saw in our last tutorial.
+                They are built to fit into the above array. The ship is also from a mesh
+                file.</para>
+            <para>The rendering function looks like this:</para>
             <example>
-                <title>DrawGimbal Function</title>
-                <programlisting language="cpp">void DrawGimbal(MatrixStack &amp;currMatrix, GimbalAxis eAxis, float fSize, glm::vec4 baseColor)
-{
-    currMatrix.Push();
-    
-    switch(eAxis)
-    {
-    case GIMBAL_X_AXIS:
-        break;
-    case GIMBAL_Y_AXIS:
-        currMatrix.RotateZ(90.0f);
-        currMatrix.RotateX(90.0f);
-        break;
-    case GIMBAL_Z_AXIS:
-        currMatrix.RotateY(90.0f);
-        currMatrix.RotateX(90.0f);
-        break;
-    }
-    
-    DrawBaseGimbal(currMatrix, fSize, baseColor);
-    currMatrix.Pop();
-}</programlisting>
-            </example>
-            <para>The rotation matrices change the orientation of the gimbal to its neutral
-                position. These matrices are chosen to allow the full array of 3 gimbals to connect
-                properly.</para>
-            <para>The <function>DrawBaseGimbal</function> function performs the basic computations
-                necessary to draw the pieces. It delegates the actual drawing to other
-                functions.</para>
-            <example>
-                <title>DrawBaseGimbal Function</title>
-                <programlisting language="cpp">void DrawBaseGimbal(MatrixStack &amp;currMatrix, float fSize, glm::vec4 baseColor)
-{
-    //A Gimbal can only be 4 units in size or more.
-    assert(fSize > 4.0f);
-    
-    glUseProgram(theProgram);
-    //Set the base color for this object.
-    glUniform4fv(baseColorUnif, 1, glm::value_ptr(baseColor));
-    glBindVertexArray(vao);
-    
-    float fGimbalSidesOffset = (fSize / 2.0f) - 1.5f;
-    float fGimbalSidesScale = fSize - 2.0f;
-    
-    DrawGimbalSides(currMatrix, fGimbalSidesOffset, fGimbalSidesScale);
-    
-    float fGimbalAttachOffset = (fSize / 2.0f) - 0.5f;
-    
-    DrawGimbalAttachments(currMatrix, fGimbalAttachOffset);
-    
-    glBindVertexArray(0);
-    glUseProgram(0);
-}
-</programlisting>
-            </example>
-            <para>The color is stored into a uniform in the program. The fragment shader uses this
-                color along with the interpolated per-vertex color to compute the final output
-                color.</para>
-            <example>
-                <title>ColorMultUniform Fragment Shader</title>
-                <programlisting language="glsl">#version 330
-
-smooth in vec4 theColor;
-uniform vec4 baseColor;
-
-out vec4 outputColor;
-
-void main()
-{
-    outputColor = theColor * baseColor;
-}</programlisting>
-            </example>
-            <para>The interpolated per-vertex color is multiplied with the base color. The colors
-                from the mesh are not really colors in this case; they serve only to darken certain
-                faces. The front and back faces use full white (1.0, 1.0, 1.0, 1.0); multiplying
-                this by <varname>baseColor</varname> will simply return
-                <varname>baseColor</varname>. Thus the front and back faces of the object are the
-                intended color. The top and bottom sides use (0.75, 0.75, 0.75, 1.0), which serves
-                to make <varname>baseColor</varname> closer to zero, but not by a lot. The left and
-                right sides use a smaller value (0.5, 0.5, 0.5, 1.0), which makes the resulting
-                color even smaller.</para>
-            <para>The <function>DrawBaseGimbal</function> function computes the length and
-                positional offset for each of the main pieces of the ring of the gimbal. Since the
-                gimbal is square, it only needs a single length and offset. The
-                    <function>DrawGimbalSides</function> draws the gimbal's square ring.</para>
-            <para>The two attachment points are rendered with ; the sizes for these are fixed, so
-                they don't vary with the size of the gimbal. The <emphasis>location</emphasis> of
-                these do vary, so <function>DrawBaseGimbal</function> must compute that
-                offset.</para>
-            <para>All of this code uses multiple spaces in multiple different places. The most
-                important thing that it shows is how each layer in the hierarchy of functions
-                doesn't care what the space in the matrix stack currently is. DrawBaseGimbal draws
-                the gimbal in a certain space; it is up to whatever happens to be on the matrix
-                stack as to how it gets transformed into the final space.</para>
-            <para>Furthermore, the lower parts of the code don't care about how the gimbal drawing
-                gets done. The <function>display</function> function that ultimately calls
-                    <function>DrawGimbal</function> doesn't care if it is drawing multiple meshes,
-                or a single scaled mesh, or whatever. It simply says to draw the Y-axis gimbal of a
-                certain size in a certain color at a transform given by the matrix stack. Similarly,
-                    <function>DrawGimbal</function> only expects <function>DrawBaseGimbal</function>
-                to draw a X-oriented gimbal; that this requires 6 rendering calls and some matrix
-                stack work is not something <function>DrawGimbal</function> is concerned
-                with.</para>
-            <para>This is the ideal for dealing with complex objects that are positioned via various
-                transforms. The higher level code should be insulated from the fact that low level
-                code may be performing complex transformations, and low-level code should be
-                insulated from the specific uses of that particular object. Look at how simple the
-                display function is:</para>
-            <example>
-                <title>Gimbal Lock's Display Function</title>
+                <title>Gimbal Lock Display Code</title>
                 <programlisting language="cpp">void display()
 {
     glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
     glClearDepth(1.0f);
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     
-    MatrixStack currMatrix;
-    currMatrix.Translate(glm::vec3(0.0f, 0.0f, -60.0f));
+    Framework::MatrixStack currMatrix;
+    currMatrix.Translate(glm::vec3(0.0f, 0.0f, -200.0f));
     currMatrix.RotateX(g_angles.fAngleX);
-    DrawGimbal(currMatrix, GIMBAL_X_AXIS, 30.0f, glm::vec4(0.4f, 0.4f, 1.0f, 1.0f));
+    DrawGimbal(currMatrix, GIMBAL_X_AXIS, glm::vec4(0.4f, 0.4f, 1.0f, 1.0f));
     currMatrix.RotateY(g_angles.fAngleY);
-    DrawGimbal(currMatrix, GIMBAL_Y_AXIS, 26.0f, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f));
+    DrawGimbal(currMatrix, GIMBAL_Y_AXIS, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f));
     currMatrix.RotateZ(g_angles.fAngleZ);
-    DrawGimbal(currMatrix, GIMBAL_Z_AXIS, 22.0f, glm::vec4(1.0f, 0.3f, 0.3f, 1.0f));
+    DrawGimbal(currMatrix, GIMBAL_Z_AXIS, glm::vec4(1.0f, 0.3f, 0.3f, 1.0f));
+    
+    glUseProgram(theProgram);
+    currMatrix.Scale(3.0, 3.0, 3.0);
+    currMatrix.RotateX(-90);
+    //Set the base color for this object.
+    glUniform4f(baseColorUnif, 1.0, 1.0, 1.0, 1.0);
+    glUniformMatrix4fv(modelToCameraMatrixUnif, 1, GL_FALSE, glm::value_ptr(currMatrix.Top()));
+    
+    g_pObject->Render("tint");
+    
+    glUseProgram(0);
     
     glutSwapBuffers();
-    glutPostRedisplay();
 }</programlisting>
             </example>
-            <para>It performs a translation, so that the gimbal is positioned in front of the
-                camera. Then it performs the 3 successive rotations, drawing each gimbal after each
-                one. So long as <function>DrawGimbal</function> is doing the job that
-                    <function>display</function> expects, everything works out fine.</para>
+            <para>The translation done first acts as our camera matrix: positioning the objects far
+                enough away to be comfortably visible. From there, the three gimbals are drawn, with
+                their appropriate rotations. Since each rotation applies to the previous one, the
+                final orientation is given to the last gimbal.</para>
+            <para>The <function>DrawGimbal</function> function does some rotations of its own, but
+                this is just to position the gimbals properly in the array. The gimbals are given a
+                color programmatically, which is the 3rd parameter to
+                    <function>DrawGimbal.</function></para>
+            <para>After building up the rotation matrix, we draw the ship. We use a scale to make it
+                reasonably large, and then rotate it so that it points in the correct direction
+                relative to the final gimbal. In model space, the ship faces the +Z axis, but the
+                gimbal faces the +Y axis. So we needed a change of coordinate system.</para>
         </section>
     </section>
     <section>
         <title>Quaternions</title>
-        <para>How do you fix this problem? There are several possible solutions to the
-            problem.</para>
-        <para>Perhaps the most optimal solution is to simply not use gimbals. After all, if you
-            don't have gimbals, you can't gimbal lock. Instead of storing the orientation as a
-            series of rotations, store the orientation as an <emphasis>orientation.</emphasis> That
-            is, maintain the current orientation as a matrix. When you need to modify the
-            orientation, you apply a transformation to this matrix, storing the result as the new
-            current orientation.</para>
+        <para>So gimbals, 3 accumulated axial rotations, don't really work very well for orienting
+            an object. How do we fix this problem?</para>
+        <para>Part of the problem is that we are trying to store an orientation as a series of 3
+            accumulated axial rotations. Orientations are <emphasis>orientations,</emphasis> not
+            rotations. And certainly not a series of them. So we need to treat the orientation of
+            the ship as an orientation.</para>
+        <para>The first thought towards this end would be to keep the orientation as a matrix. When
+            the time comes to modify the orientation, we simply apply a transformation to this
+            matrix, storing the result as the new current orientation.</para>
         <para>This means that every yaw, pitch, and roll applied to the current orientation will be
-            relative to that current orientation. Which is usually exactly what you want. If the
-            user applies a positive yaw, you want that yaw to rotate them relative to where they are
-            current pointing.</para>
-        <para>A downside of this approach, besides the size penalty of having to store a 4x4 matrix
-            rather than 3 floating-point angles, is that floating-point math can lead to errors. If
-            you keep accumulating successive transformations of an object, once every 1/30th of a
-            second for a period of several minutes or hours, these floating-point errors start
-            accumulating. Eventually, the orientation stops being a pure rotation and starts
-            incorporating scale and skewing characteristics.</para>
+            relative to that current orientation. Which is precisely what we need. If the user
+            applies a positive yaw, you want that yaw to rotate them relative to where they are
+            current pointing, not relative to some fixed coordinate system.</para>
+        <para>There are a few downsides to this approach. First, a 4x4 matrix is rather larger than
+            3 floating-point angles. But a much more difficult issue is that successive
+            floating-point math can lead to errors. If you keep accumulating successive
+            transformations of an object, once every 1/30th of a second for a period of several
+            minutes or hours, these floating-point errors start accumulating. Eventually, the
+            orientation stops being a pure rotation and starts incorporating scale and skewing
+            characteristics.</para>
         <para>The solution here is to re-orthonormalize the matrix after applying each transform. A
-            transform (space) is said to be <glossterm>orthonormal</glossterm> if the basis vectors
-            are of unit length (no scale) and each axis is perpendicular to all of the
-            others.</para>
+            coordinate system (which a matrix defines) is said to be
+                <glossterm>orthonormal</glossterm> if the basis vectors are of unit length (no
+            scale) and each axis is perpendicular to all of the others.</para>
         <para>Unfortunately, re-orthonormalizing a matrix is not a simple operation. You could try
             to normalize each of the axis vectors with typical vector normalization, but that
             wouldn't ensure that the matrix was orthonormal. It would remove scaling, but the axes
             wouldn't be guaranteed to be perpendicular.</para>
-        <para>So instead, we need to use a different way of storing an orientation. To do this, we
-            use something called a <glossterm>quaternion.</glossterm></para>
+        <para>Orthonormalization is certainly possible. But there are better solutions. Such as using
+            something called a <glossterm>quaternion.</glossterm></para>
         <para>A quaternion is (for the purposes of this conversation) a 4-dimensional vector that is
-            treated in a special way. Any change of orientation from one coordinate system to
+            treated in a special way. Any pure orientation change from one coordinate system to
             another can be represented by a rotation about some axis by some angle. A quaternion is
             a way of encoding this angle/axis rotation:</para>
-        <!--TODO: Equation: build XYZW of a quaternion from an angle/axis rotation.-->
-        <para>This will produce a <glossterm>unit quaternion.</glossterm> That is, a quaternion with
-            a length of 1.</para>
+        <equation>
+            <title>Angle/Axis to Quaternion</title>
+            <mediaobject>
+                <imageobject>
+                    <imagedata fileref="AngleAxisToQuaternion.svg" format="SVG"/>
+                </imageobject>
+            </mediaobject>
+        </equation>
+        <para>Assuming the axis itself is a unit vector, this will produce a <glossterm>unit
+                quaternion.</glossterm> That is, a quaternion with a length of 1.</para>
+        <para>Quaternions can be considered to be two parts: a vector part and a scalar part. The
+            vector part are the first three components, when displayed in the order above. The
+            scalar part is the last part.</para>
         <section>
             <title>Quaternion Math</title>
             <para>Quaternions are equivalent to orientation matrices. You can compose two
                 orientation quaternions using a special operation called <glossterm>quaternion
-                    multiplication</glossterm>.</para>
-            <!--TODO: Equation: two quaternions and the multiplication of them.-->
+                    multiplication</glossterm>. Given the quaternions <literal>a</literal> and
+                    <literal>b</literal>, the product of them is:</para>
+            <equation>
+                <title>Quaternion Multiplication</title>
+                <mediaobject>
+                    <imageobject>
+                        <imagedata fileref="QuaternionMultiplication.svg" format="SVG"/>
+                    </imageobject>
+                </mediaobject>
+            </equation>
             <para>If the two quaternions being multiplied represent orientations, then the product
-                of them is a composite orientation. Just as with matrix multiplication, only
-                specifically for orientations. Like matrix multiplication, quaternion multiplication
-                is associative (<informalequation>
+                of them is a composite orientation. This works like matrix multiplication, except
+                only for orientations. Like matrix multiplication, quaternion multiplication is
+                associative (<informalequation>
                     <mathphrase>(a*b) * c = a * (b*c)</mathphrase>
                 </informalequation>), but not commutative (<informalequation>
                     <mathphrase>a*b != b*a</mathphrase>
                 </informalequation>).</para>
-            <para>The main difference that helps us solve the Gimbal lock problem is that it is easy
-                to keep a quaternion normalized. Simply perform a vector normalization on it after
-                every few multiplications. This enables us to add numerous small rotations together
-                without numerical precision problems showing up.</para>
+            <para>The main difference between matrices and quaternions that matters for our needs is
+                that it is easy to keep a quaternion normalized. Simply perform a vector
+                normalization on it after every few multiplications. This enables us to add numerous
+                small rotations together without numerical precision problems showing up.</para>
             <para>There is one more thing we need to be able to do: convert a quaternion into a
                 rotation matrix. While we could convert a unit quaternion back into angle/axis
                 rotations, it's much preferable to do it directly:</para>
-            <!--TODO: Equation: compute rotation matrix from a quaternion.-->
+            <equation>
+                <title>Quaternion to Matrix</title>
+                <mediaobject>
+                    <imageobject>
+                        <imagedata fileref="QuaternionToMatrix.svg" format="SVG"/>
+                    </imageobject>
+                </mediaobject>
+            </equation>
+            <para>This does look suspiciously similar to the formula for generating a matrix from an
+                angle/axis rotation.</para>
         </section>
         <section>
             <title>Composition Type</title>
             <para>But which side do we do the multiplication on? Quaternion multiplication is not
                 commutative, so this will have an affect on the output. Well, it works exactly like
                 matrix math.</para>
-            <para>If you multiply the pitch increase on the left side, then it changes the pitch
-                relative to the current orientation. If you multiply the pitch on the right side, it
-                changes the pitch relative to the initial space of the vertices. Which is usually
-                model space. Since the yaw, pitch, and roll are usually defined relative to the
-                current orientation, that is what we need to do.</para>
+            <para>Our positions (p) are in model space. We are transforming them into world space.
+                The current transformation matrix is represented by the orientation O. Thus, to
+                transform points, we use <inlineequation>
+                    <mathphrase>O*p</mathphrase>
+                </inlineequation></para>
+            <para>Now, we want to adjust the orientation O by applying some small pitch change.
+                Well, the pitch of the model is defined by model space. Therefore, the pitch change
+                (R) is a transformation that takes coordinates in model space and transforms them to
+                the pitch space. So our total transformation is <inlineequation>
+                    <mathphrase>O*R*p</mathphrase>
+                </inlineequation>; the new orientation is <inlineequation>
+                    <mathphrase>O*R</mathphrase>
+                </inlineequation>.</para>
+        </section>
+        <section>
+            <title>Yaw Pitch Roll</title>
+            <para>We implement this in the <phrase role="propername">Quaternion YPR</phrase>
+                tutorial. This tutorial doesn't show gimbals, but the same controls exist for yaw,
+                pitch, and roll transformations. Here, pressing the <keycap>SpaceBar</keycap> will
+                switch between right-multiplying the YPR values to the current orientation and
+                left-multiplying them. Post-multiplication will apply the YPR transforms from
+                world-space.</para>
+            <figure>
+                <title>Quaternion YPR Project</title>
+                <mediaobject>
+                    <imageobject>
+                        <imagedata fileref="Quaternion%20YPR.png"/>
+                    </imageobject>
+                </mediaobject>
+            </figure>
+            <para>The rendering code is pretty straightforward.</para>
+            <example>
+                <title>Quaternion YPR Display</title>
+                <programlisting language="cpp">void display()
+{
+    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+    glClearDepth(1.0f);
+    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    
+    Framework::MatrixStack currMatrix;
+    currMatrix.Translate(glm::vec3(0.0f, 0.0f, -200.0f));
+    currMatrix.ApplyMatrix(glm::mat4_cast(g_orientation));
+    
+    glUseProgram(theProgram);
+    currMatrix.Scale(3.0, 3.0, 3.0);
+    currMatrix.RotateX(-90);
+    //Set the base color for this object.
+    glUniform4f(baseColorUnif, 1.0, 1.0, 1.0, 1.0);
+    glUniformMatrix4fv(modelToCameraMatrixUnif, 1, GL_FALSE, glm::value_ptr(currMatrix.Top()));
+    
+    g_pShip->Render("tint");
+    
+    glUseProgram(0);
+    
+    glutSwapBuffers();
+}</programlisting>
+            </example>
+            <para>Though GLSL does not have quaternion types or quaternion arithmetic, the GLM math
+                library provides both. The <varname>g_orientation</varname> variable is of the type
+                    <classname>glm::fquat</classname>, which is a floating-point quaternion. The
+                    <function>glm::mat4_cast</function> function converts a quaternion into a 4x4
+                rotation matrix. This stands in place of the series of 3 rotations used in the last
+                tutorial.</para>
+            <para>In response to keypresses, <varname>g_orientation</varname> is modified, applying
+                a transform to it. This is done with the <function>OffsetOrientation</function>
+                function.</para>
+            <example>
+                <title>OffsetOrientation Function</title>
+                <programlisting language="cpp">void OffsetOrientation(const glm::vec3 &amp;_axis, float fAngDeg)
+{
+    float fAngRad = Framework::DegToRad(fAngDeg);
+    
+    glm::vec3 axis = glm::normalize(_axis);
+    
+    axis = axis * sinf(fAngRad / 2.0f);
+    float scalar = cosf(fAngRad / 2.0f);
+    
+    glm::fquat offset(scalar, axis.x, axis.y, axis.z);
+    
+    if(g_bRightMultiply)
+        g_orientation = g_orientation * offset;
+    else
+        g_orientation = offset * g_orientation;
+    
+    g_orientation = glm::normalize(g_orientation);
+}</programlisting>
+            </example>
+            <para>This generates the offset quaternion from an angle and axis. Since the axis is
+                normalized, there is no need to normalize the resulting <varname>offset</varname>
+                quaternion. Then the offset is multiplied into the orientation, and the result is
+                normalized.</para>
+            <para>In particular, pay attention to the difference between right multiplication and
+                left multiplication. When you right-multiply, the offset orientation is in model
+                space. When you left-multiply, the offset is in <emphasis>world</emphasis> space.
+                Both of these can be useful for different purposes.</para>
         </section>
     </section>
     <section>
         <title>Camera-Relative Orientation</title>
-        <para/>
+        <para>As useful as model and world space offsetting is, there is one more space that it
+            might be useful to orient from. Camera-space.</para>
+        <para>This is primarily useful in modelling applications, but it can have other applications
+            as well. In such programs, as the user spins the camera around to different angles, the
+            user may want to transform the object relative to the direction of the view.</para>
+        <para>In order to understand the solution to doing this, let's frame the problem explicitly.
+            We have positions (p) in model space. These positions will be transformed by a current
+            model-to-world orientation (O), and then by a final camera matrix (C). Thus, our
+            transform equation is <inlineequation>
+                <mathphrase>C*O*p</mathphrase>
+            </inlineequation>.</para>
+        <para>We want to apply an orientation offset (R), which takes points in camera-space. If we
+            wanted to apply this to the camera matrix, it would simply be multiplied by the camera
+            matrix: <inlineequation>
+                <mathphrase>R*C*O*p</mathphrase>
+            </inlineequation>. That's nice and all, but we want to apply a transform to O, not to
+            C.</para>
+        <para>Therefore, we need to use our transforms to generate a new orientation offset (N),
+            which will produce the same effect:</para>
+        <para><informalequation>
+                <mathphrase>C*N*O = R*C*O</mathphrase>
+            </informalequation></para>
         <section>
-            <title>Transformation Spaces</title>
-            <para>Our scaling transform is interesting, but it does have certain flaws. The most
-                important problem is that it causes a scale based on the X, Y and Z axes of the
-                initial coordinate system. So what do you do if you want to scale something along
-                different axes?</para>
-            <para>This is quite simple, really: you use successive transforms. First, you transform
-                into a space where the <quote>different axes</quote>
-                <emphasis>are</emphasis> the X, Y and Z axes. Then you do your scaling transform.
-                After that, you transform back to the original space.</para>
-            <para>If the different axes represent an orientation change, you can use a rotation
-                matrix. Simply rotate, apply the scale, and rotate back. The last part is done by
-                generating the rotation matrix using the same axis, but negating the angle.</para>
-            <para>Transforming into a space that is convenient for another transform, applying that
-                transform, and then undoing the first transform is a general-purpose operation. The
-                matrix that results from this is a transformation in a different space. In the
-                scaling case, we want to do the scaling in a different space, so we apply a rotation
-                matrix to get into that space, then undo the rotation after applying the
-                scale.</para>
-            <para>The general form of this sequence is as follows. Suppose you have a transformation
-                matrix T, which operates on points in a space called F. We have some positions in
-                the space P. What we want is to create a matrix that applies T's transformation
-                operation, except that it needs to operate on points in the space of P. Given a
-                matrix M that transforms from P space to F space, that matrix is <inlineequation>
-                    <mathphrase>M<superscript>-1</superscript>TM</mathphrase>
-                </inlineequation>.</para>
-            <para>The matrix M<superscript>-1</superscript> is the <glossterm>inverse
-                    matrix</glossterm> of M. The symbol <superscript>-1</superscript> does not
-                (strictly) mean to raise the matrix to the -1 power. It means to invert it.</para>
-            <para>The inverse of a matrix M is the matrix N such that <inlineequation>
+            <title>Inversion</title>
+            <para>In order to solve this, we need to introduce a new concept. Given a matrix M,
+                there may be a matrix N such that <inlineequation>
                     <mathphrase>MN = I</mathphrase>
-                </inlineequation>, where I is the identity matrix. This can be analogized to the
-                scalar multiplicative inverse (ie: reciprocal). The scalar multiplicative inverse of
-                X is the number Y such that <inlineequation>
+                </inlineequation>, where I is the identity matrix. If there is such a matrix, the
+                matrix N is called the <glossterm>inverse matrix</glossterm> of M. The notation for
+                the inverse matrix of M is M<superscript>-1</superscript>. The symbol
+                        <quote><superscript>-1</superscript></quote> does not mean to raise the
+                matrix to the -1 power; it means to invert it.</para>
+            <para>The matrix inverse can be analogized to the scalar multiplicative inverse (ie:
+                reciprocal). The scalar multiplicative inverse of X is the number Y such that <inlineequation>
                     <mathphrase>XY = 1</mathphrase>
                 </inlineequation>.</para>
             <para>In the case of the scalar inverse, this is very easy to solve for: <inlineequation>
                     <mathphrase>Y = 1/X</mathphrase>
-                </inlineequation>. Even in this case, there are values of X for which there is no
-                multiplicative inverse. OK, there's <emphasis>one</emphasis> such value of X:
-                0.</para>
+                </inlineequation>. Easy though this may be, there are values of X for which there is
+                no multiplicative inverse. OK, there's <emphasis>one</emphasis> such real value of
+                X: 0.</para>
             <para>The case of the inverse matrix is much more complicated. Just as with the scalar
                 inverse, there are matrices that have no inverse. Unlike the scalar case, there are
                 a <emphasis>lot</emphasis> of matrices with no inverse. Also, computing the inverse
                 the component matrices. But you have to do the matrix multiplication in
                     <emphasis>reverse</emphasis> order. So if we have <inlineequation>
                     <mathphrase>M = TRS</mathphrase>
-                </inlineequation>, then M<superscript>-1</superscript> is <inlineequation>
+                </inlineequation>, then <inlineequation>
                     <mathphrase>M<superscript>-1</superscript> =
                             S<superscript>-1</superscript>R<superscript>-1</superscript>T<superscript>-1</superscript></mathphrase>
                 </inlineequation>.</para>
+            <para>Quaternions, like matrices, have a multiplicative inverse. The inverse of a pure
+                rotation matrix, which quaternions represent, is a rotation about the same axis with
+                the negative of the angle. For any angle θ, it is the case that <inlineequation>
+                    <mathphrase>sin(-θ) = -sin(θ)</mathphrase>
+                </inlineequation>. It is also the case that <inlineequation>
+                    <mathphrase>cos(-θ) = cos(θ)</mathphrase>
+                </inlineequation>. Since the vector part of a quaternion is built by multiplying the
+                axis by the sine of the half-angle, and the scalar part is the cosine of the
+                half-angle, the inverse of any quaternion is just the negation of the vector
+                part.</para>
+            <para>You can also infer this to mean that, if you negate the axis of rotation, you are
+                effectively rotating about the old axis but negating the angle. Which is true, since
+                the direction of the axis of rotation defines what direction the rotation angle
+                moves the points in. Negate the axis's direction, and you're rotating in the
+                opposite direction.</para>
+            <para>In quaternion lingo, the inverse quaternion is more correctly called the
+                    <glossterm>conjugate quaternion.</glossterm> We use the same inverse notation,
+                        <quote><superscript>-1</superscript>,</quote> to denote conjugate
+                quaternions.</para>
+            <para>Incidentally, the identity quaternion is a quaternion who's rotation angle is
+                zero. The cosine of 0 is one, and the sine of 0 is zero, so the vector part of the
+                identity quaternion is zero and the scalar part is one.</para>
+        </section>
+        <section>
+            <title>Solution</title>
+            <para>Given our new knowledge of inverse matrices, we can solve our problem.</para>
+            <para><informalequation>
+                    <mathphrase>C*N*O = R*C*O</mathphrase>
+                </informalequation></para>
+            <para>We can right-multiply both sides of this equation by the inverse transform of
+                O.</para>
+            <informalequation>
+                <mathphrase>(C*N*O)*O<superscript>-1</superscript> =
+                        (R*C*O)*O<superscript>-1</superscript></mathphrase>
+            </informalequation>
+            <informalequation>
+                <mathphrase>C*N*I = R*C*I</mathphrase>
+            </informalequation>
+            <para>The I is the identity transform. From here, we can left-multiply both sides by the
+                inverse transform of C:</para>
+            <informalequation>
+                <mathphrase>C<superscript>-1</superscript> *(C*N) =
+                    C<superscript>-1</superscript>*(R*C)</mathphrase>
+            </informalequation>
+            <informalequation>
+                <mathphrase>N = C<superscript>-1</superscript>*(R*C)</mathphrase>
+            </informalequation>
+            <para>Therefore, given an offset that is in camera space, we can generate the
+                world-space equivalent by multiplying it between the camera and inverse camera
+                transforms.</para>
+        </section>
+        <section>
+            <title>Transformation Spaces</title>
+            <para>It turns out that this is a generalized operation. It can be used for much more
+                than just orientation changes.</para>
+            <para>Consider a scale operation. Scales apply along the main axes of their space. But
+                if you want to scale something along a different axis, how do you do that?</para>
+            <para>You rotate the object into a coordinate system where the axis you want to scale
+                    <emphasis>is</emphasis> one of the basis axes, perform your scale, then rotate
+                it back with the inverse of the previous rotation.</para>
+            <para>Effectively, what we are doing is transforming, not positions, but other
+                transformation matrices into different spaces. A transformation matrix has some
+                input space and defines an output space. If we want to apply that transformation in
+                a different space, we perform this operation.</para>
+            <para>The general form of this sequence is as follows. Suppose you have a transformation
+                matrix T, which operates on points in a space called F. We have some positions in
+                the space P. What we want is to create a matrix that applies T's transformation
+                operation, except that it needs to operate on points in the space of P. Given a
+                matrix M that transforms from P space to F space, that matrix is <inlineequation>
+                    <mathphrase>M<superscript>-1</superscript>*T*M</mathphrase>
+                </inlineequation>.</para>
+        </section>
+        <section>
+            <title>Final Orientation</title>
+            <para>Let's look at how this all works out in code, with the <phrase role="propername"
+                    >Camera Relative</phrase> tutorial. This works very similarly to the last
+                tutorial, but with a few differences.</para>
+            <para>Since we are doing camera-relative rotation, we need to have an actual camera that
+                can move independently of the world. So we incorporate our camera code from our
+                world space into this one. As before, the <keycap>I</keycap> and <keycap>K</keycap>
+                keys will move the camera up and down, relative to a center point. The
+                    <keycap>J</keycap> and <keycap>K</keycap> keys will move the camera left and
+                right around the center point. Holding <keycap>Shift</keycap> with these keys will
+                move the camera in smaller increments.</para>
+            <para>The <keycap>SpaceBar</keycap> will toggle between three transforms: model-relative
+                (yaw/pitch/roll-style), world-relative, and camera-relative.</para>
+            <para>Our scene also includes a ground plane as a reference.</para>
+            <figure>
+                <title>Camera Relative Project</title>
+                <mediaobject>
+                    <imageobject>
+                        <imagedata fileref="Camera%20Relative.png"/>
+                    </imageobject>
+                </mediaobject>
+            </figure>
+            <para>The <function>display</function> function only changed where needed to deal with
+                drawing the ground plane and to handle the camera. Either way, it's nothing that
+                hasn't been seen elsewhere.</para>
+            <para>The substantive changes were in the <function>OffsetOrientation</function>
+                function:</para>
+            <example>
+                <title>Camera Relative OffsetOrientation</title>
+                <programlisting language="cpp">void OffsetOrientation(const glm::vec3 &amp;_axis, float fAngDeg)
+{
+    float fAngRad = Framework::DegToRad(fAngDeg);
+    
+    glm::vec3 axis = glm::normalize(_axis);
+    
+    axis = axis * sinf(fAngRad / 2.0f);
+    float scalar = cosf(fAngRad / 2.0f);
+    
+    glm::fquat offset(scalar, axis.x, axis.y, axis.z);
+    
+    switch(g_iOffset)
+    {
+    case MODEL_RELATIVE:
+        g_orientation = g_orientation * offset;
+        break;
+    case WORLD_RELATIVE:
+        g_orientation = offset * g_orientation;
+        break;
+    case CAMERA_RELATIVE:
+        {
+            const glm::vec3 &amp;camPos = ResolveCamPosition();
+            const glm::mat4 &amp;camMat = CalcLookAtMatrix(camPos, g_camTarget, glm::vec3(0.0f, 1.0f, 0.0f));
+            
+            glm::fquat viewQuat = glm::quat_cast(camMat);
+            glm::fquat invViewQuat = glm::conjugate(viewQuat);
+            
+            const glm::fquat &amp;worldQuat = (invViewQuat * offset * viewQuat);
+            g_orientation = worldQuat * g_orientation;
+        }
+        break;
+    }
+    
+    g_orientation = glm::normalize(g_orientation);
+}</programlisting>
+            </example>
+            <para>The change here is the addition of the camera-relative condition. To do this in
+                quaternion math, we must first convert the world-to-camera matrix into a quaternion
+                representing that orientation. This is done here using
+                    <function>glm::quat_cast</function>.</para>
+            <para>The conjugate quaternion is computed with GLM. Then, we simply multiply them with
+                the offset to compute the world-space offset orientation. This gets left-multiplied
+                into the current orientation, and we're done.</para>
         </section>
     </section>
     <section>
         <title>Interpolation</title>
-        <para>One other trick you can do with quaternions is this.</para>
-        <para/>
+        <para>A quaternion represents an orientation; it defines a coordinate system relative to
+            another. If we have two orientations, we can consider the orientation of the same object
+            represented in both coordinate systems.</para>
+        <para>What if we want to generate an orientation that is halfway between them, for some
+            definition of <quote>halfway</quote>? Or even better, consider an arbitrary
+            interpolation between two orientations, so that we can watch an object move from one
+            orientation to another. This would allow us to see an object smoothly moving from one
+            orientation to another.</para>
+        <para>This is one more trick we can play with quaternions that we can't with matrices.
+            Linearly-interpolating the components of matrices does not create anything that
+            resembles an inbetween transformation. However, linearly interpolating a pair of
+            quaternions does. As long as you normalize the results.</para>
+        <para>The <phrase role="propername">Interpolation</phrase> tutorial demonstrates this. The
+                <keycap>Q</keycap>, <keycap>W</keycap>, <keycap>E</keycap>, <keycap>R</keycap>,
+                <keycap>T</keycap>, <keycap>Y</keycap>, and <keycap>U</keycap> keys cause the ship
+            to interpolate to a new orientation. Each key corresponds to a particular orientation,
+            and the <keycap>Q</keycap> key is the initial orientation.</para>
+        <para>We can see that there are some pretty reasonable looking transitions. The transition
+            from <keycap>Q</keycap> to <keycap>W</keycap>, for example. However, there are some
+            other transitions that don't look so good; the <keycap>Q</keycap> to <keycap>E</keycap>
+            transition. What exactly is going on?</para>
+        <section>
+            <title>The Long Path</title>
+            <para>Unit quaternions represent orientations, but they are also vector directions.
+                Specifically, directions in a four-dimensional space. Being unit vectors, they
+                represent points on a 4D sphere of radius one. Therefore, the path between two
+                orientations can be considered to be simply moving from one direction to another on
+                the surface of the 4D sphere.</para>
+            <para>While unit quaternions do represent orientations, a quaternion is not a
+                    <emphasis>unique</emphasis> representation of an orientation. That is, there are
+                multiple quaternions that represent the same orientation. Well, there are
+                two.</para>
+            <para>The conjugate of a quaternion, its inverse orientation, is the negation of the
+                vector part of the quaternion. If you negate all four components however, you get
+                something quite different: the same orientation as before. Negating a quaternion
+                does not affect its orientation.</para>
+            <para>While the two quaternions represent the same orientation, they aren't the same as
+                far as interpolation is concerned. Consider a two-dimensional case:</para>
+            <!--TODO: Picture of a vector q1, a vector q2, and -q1. The angle between -q1 and q2 should be less than 90 degrees.-->
+            <para>If the angle between the two quaternions is greater than 90°, then the
+                interpolation between them will take the <quote>long path</quote> between the two
+                orientations. Which is what we see in the <keycap>Q</keycap> to <keycap>E</keycap>
+                transition. The orientation <keycap>R</keycap> is the negation of
+                <keycap>E</keycap>; if you try to interpolate between them, nothing changes. The
+                    <keycap>Q</keycap> to <keycap>R</keycap> transition looks much better
+                behaved.</para>
+            <para>This can be detected easily enough. If the 4-vector dot product between the two
+                quaternions is less than zero, then the long path will be taken. If you want to
+                prevent the long path from being used, simply negate one of the quaternions before
+                interpolating if you detect this. Similarly, if you want to force the long path,
+                then ensure that the angle is greater than 90° by negating a quaternion if the dot
+                product is greater than zero.</para>
+        </section>
+        <section>
+            <title>Interpolation Speed</title>
+            <para>There is another problem. Notice how fast the <keycap>Q</keycap> to
+                    <keycap>E</keycap> interpolation is. It starts off slow, then rapidly spins
+                around, then slows down towards the end. Why does this happen?</para>
+            <para>The linear interpolation code looks like this:</para>
+            <example>
+                <title>Quaternion Linear Interpolation</title>
+                <programlisting language="cpp">glm::fquat Lerp(const glm::fquat &amp;v0, const glm::fquat &amp;v1, float alpha)
+{
+    glm::vec4 start = Vectorize(v0);
+    glm::vec4 end = Vectorize(v1);
+    glm::vec4 interp = glm::mix(start, end, alpha);
+    interp = glm::normalize(interp);
+    return glm::fquat(interp.w, interp.x, interp.y, interp.z);
+}</programlisting>
+            </example>
+            <note>
+                <para>GLM's quaternion support does something unusual. The W component is given
+                    first to the <type>fquat</type> constructor. Be aware of that when looking
+                    through the code.</para>
+            </note>
+            <para>The <function>Vectorize</function> function simply takes a quaternion and returns
+                a <type>vec4</type>; this is necessary because GLM <type>fquat</type> don't support
+                many of the operations that GLM <type>vec4</type>'s do. In this case, the
+                    <type>glm::mix</type> function, which performs component-wise linear
+                interpolation.</para>
+            <para>Each component of the vector is interpolated separately from the rest. The
+                quaternion for <keycap>Q</keycap> is (0.7071f, 0.7071f, 0.0f, 0.0f), while the
+                quaternion for <keycap>E</keycap> is (-0.4895f, -0.7892f, -0.3700f, -0.02514f). In
+                order for the first componet of Q to get to E's first component, it will have to go
+                through zero.</para>
+            <para>When the alpha is around 0.5, half-way through the movement, the resultant vector
+                before normalization is very small. But the vector itself isn't what provides the
+                orientation; the <emphasis>direction</emphasis> of the 4D vector is. Which is why it
+                moves very fast in the middle: the direction is changing rapidly.</para>
+            <para>In order to get smooth interpolation, we need to interpolate based on the
+                direction of the vectors. That is, we interpolate along the angle between the two
+                vectors. This kind of interpolation is called <glossterm>spherical linear
+                    interpolation</glossterm> or <glossterm>slerp</glossterm>.</para>
+            <para>To see the difference this makes, press the <keycap>SpaceBar</keycap>; this
+                toggles between regular linear interpolation and slerp. The slerp version is much
+                smoother.</para>
+            <para>The code for slerp is rather complex:</para>
+            <example>
+                <title>Spherical Linear Interpolation</title>
+                <programlisting>glm::fquat Slerp(const glm::fquat &amp;v0, const glm::fquat &amp;v1, float alpha)
+{
+    float dot = glm::dot(v0, v1);
+    
+    const float DOT_THRESHOLD = 0.9995f;
+    if (dot > DOT_THRESHOLD)
+        return Lerp(v0, v1, alpha);
+    
+    glm::clamp(dot, -1.0f, 1.0f);
+    float theta_0 = acosf(dot);
+    float theta = theta_0*alpha;
+    
+    glm::fquat v2 = v1 - v0*dot;
+    v2 = glm::normalize(v2);
+    
+    return v0*cos(theta) + v2*sin(theta);
+}</programlisting>
+            </example>
+            <sidebar>
+                <title>Slerp and Performance</title>
+                <para>It's important to know what kind of problems slerp is intended to solve and
+                    what kind it is not. Slerp becomes increasingly more important the more
+                    disparate the two quaternions being interpolated are. If you know that two
+                    quaternions are always quite close to one another, then slerp isn't worth the
+                    expense.</para>
+                <para>The <function>acos</function> call in the slerp code alone is pretty
+                    substantial in terms of performance. Whereas lerp is typically just a
+                    vector/scalar multiply followed by a vector/vector addition. Even on the CPU,
+                    the performance difference is important, particularly if you're doing thousands
+                    of these per frame. As you might be in an animation system.</para>
+            </sidebar>
+        </section>
     </section>
     
     <section>
             </listitem>
             <listitem>
                 <para>Quaternions work almost identically to matrices, in so far as they specify
-                    orientations. They can be constructed directly from an angle/axis
-                    rotation.</para>
+                    orientations. They can be constructed directly from an angle/axis rotation, and
+                    they can be composed with one another via quaternion multiplication.</para>
             </listitem>
             <listitem>
                 <para>One can transform a matrix, or a quaternion with another matrix or quaternion,
                     camera-space,, while the object's orientation remains a model-to-world
                     transform.</para>
             </listitem>
+            <listitem>
+                <para>Quaternions can be interpolated, either with component-wise linear
+                    interpolation or with spherical linear interpolation. If the angle between two
+                    quaternion vectors is greater than 90°, then the interpolation between them will
+                    move indirectly between the two.</para>
+            </listitem>
         </itemizedlist>
+        <section>
+            <title>Further Study</title>
+            <para>Try doing the following with the orientation tutorials.</para>
+            <itemizedlist>
+                <listitem>
+                    <para>Modify the Interpolation tutorial to allow multiple animations to be
+                        active simultaneously. The <classname>Orientation</classname> class is
+                        already close to being able to allow this. Instead of storing a single
+                            <classname>Orientation::Animation</classname> object, it should store a
+                            <classname>std::deque</classname> of them. When the external code adds a
+                        new one, it gets pushed onto the end of the deque. During update, the
+                        front-most entries can end and be popped off, recording its destination
+                        index as the new current one in the <classname>Orientation</classname>
+                        class. To get the orientation, just call each animation's orientation
+                        function, feeding the previous result into the next one.</para>
+                </listitem>
+                <listitem>
+                    <para>Change the Interpolation tutorial to allow one to specify whether the long
+                        path or short path between two orientations should be taken. This can work
+                        for both linear and spherical interpolation.</para>
+                </listitem>
+            </itemizedlist>
+        </section>
+        <section>