Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is normal.

Put a pen on the top border of a sheet of paper. Hold the pen at the middle and turn it 90°. Now half of the pen will be outside the paper, the other half inside. Just like the line in the resulting matrix you posted.

To get a vertical line, you have to translate the line. Think of the pen, how can you move it to be at the middle of the paper vertically. Fortunately it's simple to add translation to the rotation matrix, just modify the elements at [0,2] for the X translation and [1,2] for the Y translation.