Tunnel in the sky effect
I want to implement a tunnel in the sky concept for synthetic vision system for a flight simulator. This consists of a series of rectangles/pentagons using which the pilot can fly through it and reach the runway even in bad weather conditions. I am trying to implement this. First I declared a viewport with gluPerspective projection. I defined a rectangle. I placed one on the display. I defined a glTranslate in z=direction[glTranslatef(0,0,-150)] and placed another rectangle. I expected the second rectangle to be concentric to the first. But this did not happen but the (x,y) positions of two rectangles are same although the end points are different and look concentric. Can anyone explain how to draw rectangles/pentagons as in the attached image ?
Sorry I realise that I am not allowed to attach images nor the paper I am referring to.
Your logic will only work when your camera is on the z-axis and your target (lookat point) is also on the z-axis. You need to offset the rectangles along the camera-target vector if you want the tunnel to show the direction the plane is travelling. Also the rectangles need to be parallel to the up-right plane. It is probably easier to change to an orthogonal view and draw a set of concentric 2D rectangles around the center of the screen.