Immersive display on wall

Hello

I’m trying to make an immersive display on a wall and I’m using a tracker for head movement

I’ve been trying to adapt an algorithm that I’ve found
Calculating Stereo Pairs - Off axis Frustums - OpenGL
http://klee.usr.dico.unimi.it/~dan/PGL/doc/articoli&libri/Calculating%20Stereo%20Pairs.pdf

But I still have problem … and I don’t have a lot of time remaining

For the moment, In short, I have …
the coordinates of the headtracker (helmetpos)
the 4 screen corners (pul, pur, pdl, pdr)

screen width : 2.4 m
screen height : 1.2 m
the wall is about 1.5 m from the tracking center

znear = helmetpos[Z]-pdl[Z];
zfar = 1000; or some value bigger then znear (constant for the moment)

left = pul[X]-helmetpos[X];
right = pur[X]-helmetpos[X];
bottom = pdl[Y]-helmetpos[Y];
top = pul[Y]-helmetpos[Y];

glFrustum( left, right, bottom, top, znear, zFar );

screenCenter = (pur+pdl)/2

gluLookAt(
helmetpos[X],helmetpos[Y],helmetpos[Z],
screenCenter[X],screenCenter[Y],screenCenter[Z], 0, 1, 0
);

But I still have problems to get a realistic view
and there is so many things … I’m confused

The main problem I see is that:
Going from the left to the right limit of the screen (from a distance) make the scene go totally out of view even if it is supposed to stay in front
I know that I have to watch the screen from an Off axis Frustums but the consequences are far more than expected

Thank you for your help

Hello

Is it possible that my problem is related to the fact that my gluLookAt is pointing to the screen center and not perpendicular to the wall

I cannot test for the moment since I’m not in the lab … but it just came to my mind

Thanks for your help

glFrustum / gluLookAt is not ebough when you need off-axis projection.
Read this to convince yourself :
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/caev/

You have to do it directly on the projection matrix.

Thank you for your advice

But in fact, my idea was right and it now work really well
So the gluLookAt have to stay perpendicular to the wall

I may have introduced you in mistake by the lack of details

But thanks again