non-linear stereoscopic rendering

I am currently writing some code to try and implement some non-linear rendering for a stereographic/holographic display. I want to implement the following equation on all x coordinates:
x=(z/d)*(x - e + ez)
where e and d are constants and z is the corresponding z value for x.

As you can see you get a xz and a zz term which makes it very difficult to implement using matrix notation…in fact impossible I believe.

Is there any other way that I can specify a function that it will run on all the x coordinates?

Any input will be highly appreciated.

Thanks!

Christian

Are you saying you want to build an asymmetric viewing frustum for each eye? Read about shear matrices. For really simple stereo, you can build a suitable shear matrix by starting with an identity matrix and modify just 1 of the 16 elements.

No I am not doing a simple stereoscopic rendering. That would, indeed as you point out, only require a shear matrix.

What I am trying to solve is more complicated. I am trying to make the x value a non-linear function:

so x=Axz + Bzz + C

where A,B,C are constants. This I believe can not be implemented straight forward using matrices.