# Thread: Can I revolve the view point ?

1. ## Can I revolve the view point ?

Hi Guys

I think rotating the whole world around a point in the space is the same as orbiting the eye around the same point, my question is: can I physically orbit the eye while keeping the world stationary? how can we do that ?

thanks

Silvia

2. ## Re: Can I revolve the view point ?

If the camera is orbiting only in one of the two examples are they not the same. One solution is to use polar coordinates. From chapter 4 in the red book:

Suppose your application involves orbiting the camera around an object that's centered at the origin. In this case, you'd like to specify the viewing transformation by using polar coordinates. Let the distance variable define the radius of the orbit, or how far the camera is from the origin. (Initially, the camera is moved distance units along the positive z-axis.) The azimuth describes the angle of rotation of the camera about the object in the x-y plane, measured from the positive y-axis. Similarly, elevation is the angle of rotation of the camera in the y-z plane, measured from the positive z-axis. Finally, twist represents the rotation of the viewing volume around its line of sight.

Show that the following routine could serve as the viewing transformation:

void polarView{GLdouble distance, GLdouble twist,
GLdouble elevation, GLdouble azimuth)
{
glTranslated(0.0, 0.0, -distance);
glRotated(-twist, 0.0, 0.0, 1.0);
glRotated(-elevation, 1.0, 0.0, 0.0);
glRotated(azimuth, 0.0, 0.0, 1.0);
}

3. ## Re: Can I revolve the view point ?

my problem is not how to represent the camera orientation (polar or quaternion or whatelse), I need the final effect to be:
stationary world and orbiting camera, I do not need to orbit the whole world around the pivot point.

4. ## Re: Can I revolve the view point ?

I dont know what is most confusing your sex or the talk about orbiting the camera instead of the world.
I guess the above is rude but what do you think the code does? The text clearly says that the code is for orbiting the camera.

5. ## Re: Can I revolve the view point ?

what the hell r u talking about ?
I am talking about OpenGL stuff and you are talking about sex !!!!
what is the matter with you ? anyhow thanks allot for the replys

6. ## Re: Can I revolve the view point ?

there is no such thing as a camera, its an analogy. The only thing you can do is change the position of objects in your world. Rotating the world makes it seem as though the "eye" is moving but there is no eye, its just the motion of the world

7. ## Re: Can I revolve the view point ?

Dont pretend to be a woman if you find it embarrasing. http://www.opengl.org/discussion_boa...ML/014273.html

8. ## Re: Can I revolve the view point ?

Dear RH

Can you send me your e-mail
I need to talk to u in person
I have something to tell you

thanks

9. ## Re: Can I revolve the view point ?

No, its very tempting but I dont want to get between you and Moe. Its better if we are just friends. God knows what he would do if he found out about you and me.

10. ## Re: Can I revolve the view point ?

Well if the point == the eye location it would rotate about the eye wouldn't it.

Now if the eye is at 0,0 (depends when the matrix for the rotation is applied) then there would be no need for the translates to and from the point of rotation at all.

So, a competent implementation would probably move the location in the code at which the rotation was applied on the modelview matrix and remove the translates.

The final thing you may want to do is reverse the angle of rotation since eye manipulations should be the reverse of model manipulations if you are trying to apply the equivalent of the model operation to the eye.

What course are you studying on?

Page 1 of 2 12 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•