Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Can I revolve the view point ?

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2003
    Posts
    8

    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. #2
    Guest

    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. #3
    Junior Member Newbie
    Join Date
    Oct 2003
    Posts
    8

    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. #4
    Guest

    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. #5
    Junior Member Newbie
    Join Date
    Oct 2003
    Posts
    8

    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. #6
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    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. #7
    Guest

    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. #8
    Junior Member Newbie
    Join Date
    Oct 2003
    Posts
    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. #9
    Guest

    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. #10
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    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 LastLast

Similar Threads

  1. Glut/GL Camera or view point please help
    By Slong in forum OpenGL: Basic Coding
    Replies: 15
    Last Post: 11-09-2009, 08:59 PM
  2. Fastest way to compute 2D view point from 3D point?
    By robosport in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-15-2003, 11:45 AM
  3. How to tell if a point is in view?
    By Structural in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-04-2002, 01:35 PM
  4. View point coord
    By Lanstorp in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-08-2002, 12:22 PM
  5. How to calculate if a point is in view-area??
    By lsdi in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-03-2002, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean