Projecting 3D on 2D
A point in a three dimensional coordinate system can be represented by a \(3\times 1\) matrix. When modelling three dimensions on a two dimensional computer screen, you must project each point to 2D. After the projection, each point is represented by a \(2\times 1\) matrix.
If we assume that the z-axes (or the third base vector) is pointing from the computer screen, then the screen is a projection on the xy-plane.
The projection matrix \(\mathbf{P}\) must map the matrix \(\mathbf{v}=\left( \begin{array}{} a\\b\\c\\ \end{array}\right)\) onto a matrix \(\mathbf{w}=\left( \begin{array}{} a\\b\\ \end{array}\right)\). This can be achieved by letting
\[\mathbf{P}=\left( \begin{array}{} 1 & 0 & 0\\0 & 1 & 0\\ \end{array}\right)\]
Then let \(\mathbf{w}=\mathbf{P}\mathbf{v}\).
Matrix as a visual point
In GeoGebra, matrices are represented by lists. A \(2\times 1\) matrix is not shown in the drawing pad.
If you want to show a matrix \(\mathbf{matrix1}=\binom{2}{1}\) as a point, you must use the matrix elements as
coordinates for a new point. You retrieve an element of a matrix by using the command
Element[<matrix>, <row>, <column>].
To show a \(2\times 1\)-matrix \(\mathbf{w}\) as a point \(A\), you write:
A=(Element[w,1,1],Element[w,2,1])
Exercise
- Make three sliders to represent the matrix elements \(v_x, v_y, v_z\) of a matrix \(\mathbf{v}\).
- Create the matrix \(\mathbf{v}\) by using the spreadsheet or by entering it as a list in the
input bar:
v={{v_x},{v_y},{v_z}} - Create the projection matrix \(\mathbf{P}\).
- Create the projected matrix \(\mathbf{w}=\mathbf{P}\mathbf{v}\) in the input bar:
w=P v - Create a point A, having the elements of \(\mathbf{w}\) as coordinates.
- Change the sliders. When changing the \(v_z\)-slider, nothing should happen with the point A.
This continues with the rotations on the next page.
by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License
