PDA

View Full Version : Some confusion about matrix

Lee_Jennifer_82
11-22-2015, 12:36 PM
Suppose, I have defined a model view matrix as follows:

|1 0 0.0 -0.5cos(theta) 0|
|0.0 1.0 -0.5cos(alpha) 0|
|0.0 0.0 1.0 0|
|0.0 0.0 0.0 1.0|

where theta and alpha are some angles less that 90 degree.
What transformation actually this matrix does? Is it about some foreshortening along x and y direction?
Any clarification will be highly appreciated.

GClements
11-22-2015, 05:17 PM
That matrix performs an oblique projection, but I'm unsure as to what theta and alpha are meant to represent.

Oblique projections are normally expressed as

[1 0 a*cos(phi) 0]
[0 1 a*sin(phi) 0]
[0 0 1 0]
[0 0 0 1]

where a=1/tan(alpha).

With that construction, alpha is the angle between the projection lines and the projection plane (45° for a cavalier projection, arctan(2) ~= 63.4° for a cabinet projection; 90° gives an orthographic projection, a=0), while phi is the angle between the projected Z axis and the X axis.(typically 30° or 45°).

Lee_Jennifer_82
11-22-2015, 05:58 PM
I'm unsure as to what theta and alpha are meant to represent.

Thank you so much! Now I understand. Actually 'theta' and 'phi' are angles of projection with the x and y axes respectively.