2018-11-12 10:37:08 +00:00
\documentclass [12pt, a4paper] { article}
2018-11-06 15:08:39 +00:00
%packages
\usepackage [ngerman] { babel}
\usepackage [utf8x] { inputenc}
%Formel packages
\usepackage { amsmath}
\usepackage { amsthm}
\usepackage { amsbsy}
\usepackage { amssymb}
\usepackage { enumerate}
\begin { document}
\section * { Computer Graphics - Excercise 1}
\subsection * { 1.1.1}
\subsection * { a)}
\begin { itemize}
2018-11-11 15:31:48 +00:00
\item Matrix Multiplication $ \widehat { = } $ transformation
2018-11-06 15:08:39 +00:00
\item Inverse of a transformation $ \tilde { T } ^ { - 1 } $ \\
\begin { align*}
\Rightarrow & & \tilde { T} *\tilde { T} ^ { -1} & = \tilde { T} ^ { -1} *\tilde { T} = \tilde { E} & & \left |\ * \tilde { p} \right . \\
& & \tilde { T} ^ { -1} *\tilde { T} *\tilde { p} & = \tilde { E} *\tilde { p} & & \left |\ \tilde { T} *\tilde { p} =\tilde { p'} \right . \\
\Rightarrow & & \tilde { E} *\tilde { p} = \tilde { p} & , \hspace { 1em} \tilde { T} ^ { -1} *\tilde { p'} = \tilde { p} \\
\end { align*}
\end { itemize}
\subsection * { b)}
2018-11-11 15:31:48 +00:00
For $ R _ 1 \times R _ 2 $ \\
\begin { gather*}
\begin { pmatrix} a & b & 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} e & f & 0 \\ g& h& 0\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} a \times e + b \times g& a \times f + b \times h & 0 \\ c \times e + d \times g& c \times f + d \times h & 0\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
For $ R _ 2 \times R _ 1 $ \\
\begin { gather*}
\begin { pmatrix} e & f & 0 \\ g& h& 0\\ 0& 0& 1\\ \end { pmatrix} \times \begin { pmatrix} a & b & 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} =\begin { pmatrix} a \times e + c \times f& b \times e + d \times f & 0 \\ a \times g + c \times h& b \times g + d \times h & 0\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow R _ 1 \times R _ 2 \neq R _ 2 \times R _ 1 \Rightarrow $ does not commute\\
\newpage
2018-11-12 10:37:08 +00:00
\hspace { -2em}
2018-11-11 15:31:48 +00:00
For $ T _ 1 \times T _ 2 $ \\
\begin { gather*}
\begin { pmatrix} 1 & 0 & a \\ 0& 1& b\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} 1 & 0 & c \\ 0& 1& d\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} 1& 0 & a+c \\ 0& 1 & b+d\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
2018-11-12 10:37:08 +00:00
\hspace { -0.5em}
2018-11-11 15:31:48 +00:00
For $ T _ 2 \times T _ 1 $ \\
\begin { gather*}
\begin { pmatrix} 1 & 0 & c \\ 0& 1& d\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} 1 & 0 & a \\ 0& 1& b\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} 1& 0 & a+c \\ 0& 1 & b+d\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow T _ 1 \times T _ 2 = T _ 2 \times T _ 1 \Rightarrow $ does commute\\
2018-11-12 10:37:08 +00:00
\\
\hspace { -1.5em}
2018-11-11 15:31:48 +00:00
For $ S _ 1 \times S _ 2 $ \\
\begin { gather*}
\begin { pmatrix} a & 0 & 0 \\ 0& b& 0\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} c & 0 & 0 \\ 0& d& 0\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} a \times c & 0 & 0 \\ b \times d& 0 & 0\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
For $ S _ 2 \times S _ 1 $ \\
\begin { gather*}
\begin { pmatrix} c & 0& 0 \\ 0& d& 0\\ 0& 0& 1\\ \end { pmatrix} \times \begin { pmatrix} a & 0 & 0 \\ 0& b& 0\\ 0& 0& 1 \\ \end { pmatrix} =\begin { pmatrix} a \times c & 0 & 0 \\ b \times d& 0 & 0\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow S _ 1 \times S _ 2 = S _ 2 \times S _ 1 \Rightarrow $ does commute\\
2018-11-12 10:37:08 +00:00
\\
\hspace { -1.5em}
2018-11-11 15:31:48 +00:00
For $ R \times T $ \\
\begin { gather*}
\begin { pmatrix} a & b& 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} 1 & 0 & e \\ 0& 1& f\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} a& b & a \times e + b \times f \\ c& d & c\times e + d \times f\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
For $ T \times R $ \\
\begin { gather*}
\begin { pmatrix} 1 & 0 & e \\ 0& 1& f\\ 0& 0& 1\\ \end { pmatrix} \times \begin { pmatrix} a & b& 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} =\begin { pmatrix} a& b & e \\ c& d & f\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow R \times T \neq T \times R \Rightarrow $ does not commute\\
2018-11-12 10:37:08 +00:00
\\
\hspace { -1.5em}
2018-11-11 15:31:48 +00:00
For $ R \times S $ \\
\begin { gather*}
\begin { pmatrix} a & b& 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} e & 0 & 0 \\ 0& f& 0\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} a \times e& b \times f & 0 \\ c \times f & d \times f & 0\times e + d \times f\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
For $ S \times R $ \\
\begin { gather*}
\begin { pmatrix} e & 0 & 0 \\ 0& f& 0\\ 0& 0& 1\\ \end { pmatrix} \times \begin { pmatrix} a & b& 0 \\ c& d& 0\\ 0& 0& 1 \\ \end { pmatrix} =\begin { pmatrix} a \times e& b \times f & 0 \\ c \times f & d \times f & 0\times e + d \times f\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow R \times S = S \times R \Rightarrow $ does commute\\
2018-11-12 10:37:08 +00:00
\\
\hspace { -1.5em}
2018-11-11 15:31:48 +00:00
For $ S \times T $ \\
\begin { gather*}
\begin { pmatrix} 1 & 0 & a \\ 0& 0& b\\ 0& 0& 1 \\ \end { pmatrix} \times \begin { pmatrix} c & 0 & 0 \\ 0& d& 0\\ 0& 0& 1\\ \end { pmatrix} =\begin { pmatrix} c & 0 & a \\ 0& d & b\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
For $ T \times S $ \\
\begin { gather*}
\begin { pmatrix} c & 0 & 0 \\ 0& d& 0\\ 0& 0& 1\\ \end { pmatrix} \times \begin { pmatrix} 1 & 0 & a \\ 0& 0& b\\ 0& 0& 1 \\ \end { pmatrix} =\begin { pmatrix} c & 0 & a \times c \\ d& 0 & b \times d\\ 0& 0& 1 \\ \end { pmatrix}
\end { gather*}
$ \Rightarrow S \times T \neq T \times S \Rightarrow $ does not commute\\
2018-11-06 15:08:39 +00:00
\subsection * { 1.1.2}
\subsection * { a)}
\begin { gather*}
2018-11-12 10:42:52 +00:00
\begin { pmatrix} 1 & 0 & 0 \\ 0& 0& 1\\ 0& 1& 0 \\ \end { pmatrix} \times \begin { pmatrix} x_ 1 & x_ 2 & \cdots & x_ n \\ y_ 1& y_ 2& \cdots & y_ n\\ z_ 1& z_ 2& \cdots & z_ n \\ \end { pmatrix} =\begin { pmatrix} x_ 1 & x_ 2 & \cdots & x_ n \\ z_ 1& z_ 2& \cdots & z_ n\\ y_ 1& y_ 2& \cdots & y_ n \\ \end { pmatrix}
2018-11-06 15:08:39 +00:00
\end { gather*}
2018-11-11 15:31:48 +00:00
2018-11-06 15:08:39 +00:00
\subsection * { b)}
\begin { gather*}
2018-11-12 10:42:52 +00:00
\begin { pmatrix} x_ 1 & x_ 2 & \cdots & x_ n \\ y_ 1& y_ 2& \cdots & y_ n\\ z_ 1& z_ 2& \cdots & z_ n \\ \end { pmatrix} \times \begin { pmatrix} 1 \\ 1 \\ \vdots \\ 1 \\ \end { pmatrix} =
2018-11-06 17:53:45 +00:00
\begin { pmatrix} \sum \limits _ { i=1} x_ i \\ \sum \limits _ { i=1} y_ i \\ \sum \limits _ { i=1} z_ i \end { pmatrix}
2018-11-06 15:08:39 +00:00
\end { gather*}
2018-11-12 10:25:18 +00:00
\subsection * { c)}
2018-11-12 10:08:47 +00:00
\begin { gather*}
2018-11-12 10:25:18 +00:00
\tilde { M} = \begin { pmatrix} M_ { 11} & M_ { 12} & M_ { 13} & t_ x \\ M_ { 21} & M_ { 22} & M_ { 23} & t_ y\\ M_ { 31} & M_ { 32} & M_ { 33} & t_ z \\ p_ x& p_ y& p_ z& 1 \\ \end { pmatrix} ;
2018-11-12 10:08:47 +00:00
e = \begin { pmatrix} 5 \\ 10 \\ 5 \\ \end { pmatrix} = t;
p = \begin { pmatrix} 0 \\ 0 \\ 0 \\ \end { pmatrix}
\end { gather*}
\begin { gather*}
2018-11-12 10:17:10 +00:00
z_ \phi = \frac { \begin { pmatrix} 0\\ 0\\ 1\\ \end { pmatrix} \times p_ x} { 1 \times |p_ x|} \Rightarrow \begin { pmatrix} cos(z_ \phi ) & -sin(z_ \phi ) & 0 \\ sin(z_ \phi )& cos(z_ \phi )& 0\\ 0& 0& 1 \\ \end { pmatrix} =R_ z\\
y_ \phi = \frac { \begin { pmatrix} 0\\ 1\\ 0\\ \end { pmatrix} \times p_ x} { 1 \times |p_ x|} \Rightarrow \begin { pmatrix} cos(y_ \phi ) & 0 & sin(y_ \phi ) \\ 0 & 1 & 0\\ -sin(z_ \phi )& 0& cos(y_ \phi ) \\ \end { pmatrix} =R_ y\\
x_ \phi = \frac { \begin { pmatrix} 1\\ 0\\ 0\\ \end { pmatrix} \times p_ x} { 1 \times |p_ x|} \Rightarrow \begin { pmatrix} 0 & 0 & 0 \\ 0 & cos(x_ \phi )& -sin(x_ \phi )\\ 0& sin(x_ \phi )& cos(x_ \phi ) \\ \end { pmatrix} =R_ x\\
2018-11-12 10:08:47 +00:00
M = R_ x \times R_ y \times R_ z \\
2018-11-12 10:25:18 +00:00
\end { gather*}
2018-11-12 10:37:08 +00:00
\newpage
2018-11-12 10:25:18 +00:00
Berechnung für: \\
$ p _ 1 = ( - 1 , - 1 , 1 ) ; p _ 2 = ( 2 , 1 , - 2 ) ; p _ 3 = ( 2 , 1 , - 3 ) ; p _ 4 = ( - 1 , - 2 , 1 ) ; p _ 5 = ( 3 , - 1 , 0 ) $
\begin { gather*}
\Rightarrow Vector =\begin { pmatrix}
p_ 1 \times \tilde { M_ 1} \\
p_ 2 \times \tilde { M_ 2} \\
p_ 3 \times \tilde { M_ 3} \\
p_ 4 \times \tilde { M_ 4} \\
p_ 5 \times \tilde { M_ 5} \\ \end { pmatrix}
=
\begin { pmatrix}
2018-11-12 10:08:47 +00:00
6.323746006808568\\
2.672777625063053\\
1.6528549605644152\\
6.432049954608068\\
4.731031538265404\\ \end { pmatrix} \\
\Rightarrow z_ { far} = p_ 4 = 6.432049954608068; z_ { near} = p_ 3 = 1.6528549605644152\\
\end { gather*}
2018-11-06 15:08:39 +00:00
\end { document}