augmented matrix

\begin{bmatrix}
\vec{y}
\\ 
1
\end{bmatrix}

=

\begin{bmatrix}
A & | & \vec{b} \\ 
0 .. 0 & | & 1
\end{bmatrix}

\begin{bmatrix}
\vec{x} \\
1
\end{bmatrix}




y' = A \vec{x} + \vec{b}





\begin{bmatrix}
x'
\\ 
y'
\\ 
1
\end{bmatrix}

=

\begin{bmatrix}
gt_{1} & gt_{2} & gt_{0} \\ 
gt_{4} & gt_{5} & gt_{3} \\ 
0 & 0 & 1
\end{bmatrix}

\begin{bmatrix}
x \\ 
y \\ 
1
\end{bmatrix}



\\
x' = gt_{1} x + gt_{2} y + gt_{0} \\
y' = gt_{4} x + gt_{5} y + gt_{3} \\
1 = 0 + 0 + 1



linear solution of intesection

\\
z_{d} = m_{d} x' + q_{d} \\
z_{p} = m_{p} x' + q_{p} \\

\\
m_{d} x' + q_{d} = m_{p} x' + q_{p} \Rightarrow \\
(m_{d} - m_{p}) x' = q_{p} - q_{d} \Rightarrow \\
x' = \frac{q_{p} - q_{d}}{m_{d} - m_{p}}

\frac{x'}{cell size'} = i'  [0 \to 1 ]



