Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: amount of inofrmation from one system to the other

  1. #1
    Intern Contributor
    Join Date
    May 2017
    Posts
    59

    amount of inofrmation from one system to the other

    Hi, my question is very broad. I recently tried to understand a tutorial using polar coordinates in moving the camera about. The coordinate was described in (theta, radius). What I don't understand is theoretically how one can get more information from a lower information state: example, cartesian coordinates (x,y,z) from polar(theta,r). Please forgive any assumption that I may have violated, etc., the polar coordinate system is pretty new to me.
    Also why would I want to use a polar system over s cartesian?

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    425
    Quote Originally Posted by technologist View Post
    Hi, my question is very broad. I recently tried to understand a tutorial using polar coordinates in moving the camera about. The coordinate was described in (theta, radius). What I don't understand is theoretically how one can get more information from a lower information state: example, cartesian coordinates (x,y,z) from polar(theta,r). Please forgive any assumption that I may have violated, etc., the polar coordinate system is pretty new to me.
    Also why would I want to use a polar system over s cartesian?
    In 3D, for polar coordinates you need another dimension: the elevation angle, generally named phi. So you have (r, theta, phi) which allows you to orientate on a unit sphere and to place at whatever radius. Which is similar to a cartesian vector v (x,y,z), which, from the origin, allows you to place wherever on the unit sphere as well (x/magnitude(v),x/magnitude(v),z/magnitude(v)) and at whatever distance from it (the magnitude of the vector).

  3. #3
    Intern Contributor
    Join Date
    May 2017
    Posts
    59

    gluLookAt system

    Thank you for the reply:

    When considering gluLookAt(Eyex,Eyey,Eyez,Targetx, Ty,Tz, 0,1,0) is gluLookAt navigation-specific? In other words is gLA natively polar, or, cartesian, or both?

    Thx in advance

  4. #4
    Intern Contributor
    Join Date
    May 2017
    Posts
    59

    q2

    Quote Originally Posted by technologist View Post
    Thank you for the reply:

    When considering gluLookAt(Eyex,Eyey,Eyez,Targetx, Ty,Tz, 0,1,0) is gluLookAt navigation-specific? In other words is gLA natively polar, or, cartesian, or both?

    Thx in advance
    Sorry, troubles with forum.

    Secondly (in addition to above), when polar coordinates are changing on keystroke by keystroke input, are the position results aggregated to a sum total frame by frame, or are the position results always calculated from the same origin point e.g. 0,0,0 within a unit circle and multiplied by radii (vector magnitude if cartesian)? Sorry if the descriptions are rough and inaccurate.

    Thx in advance

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,466
    Quote Originally Posted by technologist View Post
    When considering gluLookAt(Eyex,Eyey,Eyez,Targetx, Ty,Tz, 0,1,0) is gluLookAt navigation-specific? In other words is gLA natively polar, or, cartesian, or both?
    Cartesian. The eye, target and up vectors have to use Cartesian coordinates. If you had polar coordinates, you'd either convert them to Cartesian coordinates or use a combination of glRotate and glTranslate.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,466
    Quote Originally Posted by technologist View Post
    Secondly (in addition to above), when polar coordinates are changing on keystroke by keystroke input, are the position results aggregated to a sum total frame by frame, or are the position results always calculated from the same origin point e.g. 0,0,0 within a unit circle and multiplied by radii (vector magnitude if cartesian)?
    You might implement an orbital camera by accumulating changes to polar coordinates. Other than that, polar coordinates are rarely used; most things are much simpler with cartesian coordinates. E.g. if you're navigating on a sphere, you'd either use geocentric Cartesian coordinates, or a projected coordinate system (Mercator or whatever).

  7. #7
    Intern Contributor
    Join Date
    May 2017
    Posts
    59
    Thank you for all the answers. Very helpful.

Tags for this Thread

Posting Permissions

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