PDA

View Full Version : viewed volume



valefor
05-01-2002, 08:43 AM
I would like to know if we can do a matrix that give a frustum volume with a triangular base

V-man
05-02-2002, 03:12 PM
Triangular cant be done but you can approximate it with a trapezoidal projection.

What you need to do is establish a scale matrix to scale one of the coordinates (y in this case), along one of the axis (y axis in this case)

Something like this should do:

glLoadIdentity()
glFrustum(0, value, 0, value, 1.0, far);
glScalef(1.0, y, 1.0);

where y is some large positive value.

V-man



[This message has been edited by V-man (edited 05-02-2002).]