Zoom window in perspective

I am not getting how to have a rectangular
portion of my object get zoomed using Perspective Projection.
Basically, I want zoom window using Perspective Projection.
I am using
gluPerspective(45.0f, aspect_ratio, 0.01, 100.0);
Any idea will be a great help.

Hi !

You can cheat by changing the field of view angle to something else, or you can move the “camera” closer to the object.

If you mean that you want to draw a rubberband rectangle in a window and zoom in that area, then it might be a little more tricky.

Mikael

Don’t panic. I have an example of this at home I will post up tonight. It was featured as a tutorial somewhere - might even have been here way back.

This guy made an app to rubber band a rotating cube and automatically `zoom’ the FOV to the correct size -

Mikael… changing FOV isnt cheating, that is how a ZOOM really works… you dont walk closer with your camera when you zoom, do you? :slight_smile:

Thanx Robbo,
but where will you post it.
I know that i have to change the FOV by some amount, but i dont know by what factor, since
i want exactly that part of the object or scene to be zoomed which is selected inside the zoom window or rectangle.

Regards
abhinav

Originally posted by Robbo:
[b]Don’t panic. I have an example of this at home I will post up tonight. It was featured as a tutorial somewhere - might even have been here way back.

This guy made an app to rubber band a rotating cube and automatically `zoom’ the FOV to the correct size - [/b]

Hi!
I would really love to have a look at this application too, Robbo is speaking about. So if there is any possibility, I would be very grateful!
Regards, Batti

There is a link to some code on my page, cant remember the link to the code but it is there…
http://cheo.resnet.wayne.edu/miguel/

[This message has been edited by mancha (edited 09-06-2002).]