comparison thesis/cortex.org @ 476:5a15611fbb9f

make latex happy.
author Robert McIntyre <rlm@mit.edu>
date Fri, 28 Mar 2014 22:09:03 -0400
parents 3ec428e096e5
children ba54df21fc7c
comparison
equal deleted inserted replaced
475:3ec428e096e5 476:5a15611fbb9f
1739 Triangles are [[http://mathworld.wolfram.com/AffineTransformation.html ][affine]], which means any triangle can be transformed 1739 Triangles are [[http://mathworld.wolfram.com/AffineTransformation.html ][affine]], which means any triangle can be transformed
1740 into any other by a combination of translation, scaling, and 1740 into any other by a combination of translation, scaling, and
1741 rotation. The affine transformation from one triangle to another 1741 rotation. The affine transformation from one triangle to another
1742 is readily computable if the triangle is expressed in terms of a 1742 is readily computable if the triangle is expressed in terms of a
1743 $4x4$ matrix. 1743 $4x4$ matrix.
1744 1744
1745 #+BEGIN_LaTeX
1746 $$
1745 \begin{bmatrix} 1747 \begin{bmatrix}
1746 x_1 & x_2 & x_3 & n_x \\ 1748 x_1 & x_2 & x_3 & n_x \\
1747 y_1 & y_2 & y_3 & n_y \\ 1749 y_1 & y_2 & y_3 & n_y \\
1748 z_1 & z_2 & z_3 & n_z \\ 1750 z_1 & z_2 & z_3 & n_z \\
1749 1 & 1 & 1 & 1 1751 1 & 1 & 1 & 1
1750 \end{bmatrix} 1752 \end{bmatrix}
1753 $$
1754 #+END_LaTeX
1751 1755
1752 Here, the first three columns of the matrix are the vertices of 1756 Here, the first three columns of the matrix are the vertices of
1753 the triangle. The last column is the right-handed unit normal of 1757 the triangle. The last column is the right-handed unit normal of
1754 the triangle. 1758 the triangle.
1755 1759
1756 With two triangles $T_{1}$ and $T_{2}$ each expressed as a matrix 1760 With two triangles $T_{1}$ and $T_{2}$ each expressed as a
1757 like above, the affine transform from $T_{1}$ to $T_{2}$ is 1761 matrix like above, the affine transform from $T_{1}$ to $T_{2}$
1758 1762 is $T_{2}T_{1}^{-1}$.
1759 $T_{2}T_{1}^{-1}$
1760 1763
1761 The clojure code below recapitulates the formulas above, using 1764 The clojure code below recapitulates the formulas above, using
1762 jMonkeyEngine's =Matrix4f= objects, which can describe any affine 1765 jMonkeyEngine's =Matrix4f= objects, which can describe any affine
1763 transformation. 1766 transformation.
1764 1767