1 / 12

Tutorial 11

Tutorial 11. UVN viewing-coordinate reference frame n = N/|N| u = (V x n)/ |V| v = n x u. float viewAngle = 30.0; float aspectRatio = 1.5; float near = 40.0; float far = 180.0; glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(viewAngle, aspectRatio, near, far);.

lamar
Download Presentation

Tutorial 11

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 11 UVN viewing-coordinate reference frame • n = N/|N| • u = (V x n)/ |V| • v = n x u

  2. float viewAngle = 30.0; float aspectRatio = 1.5; float near = 40.0; float far = 180.0; glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(viewAngle, aspectRatio, near, far);

  3. glMatrixMode(GL_PROJECTION); • glLoadIdentity(); • glFrustum(–20, 20, –10, 10, 50, 200);

  4. glMatrixMode(GL_PROJECTION); • glLoadIdentity(); • glFrustum(–20, 20, –10, 10, 50, 200); • glMatrixMode(GL_MODELVIEW); • glLoadIdentity(); • gluLookAt(-10, 5, 30, 100, 30, -30, 0, 1 ,0);

  5. eyeX, eyeY, eyeZ Specifies the position of the eye point. centerX, centerY, centerZ Specifies the position of the reference point. upX, upY, upZ Specifies the direction of the up vector.

More Related