SlideServe
Menu
Préférences
© SlideServe · v2026

Honours Graphics 2008

duke avatar
16 diapositives · 366 Views · Aug 28, 2014

Honours Graphics 2008. Session 3. Today’s focus. Perspective and orthogonal projection Quaternions Graphics camera. Projections. Visualizing 3D data on a 2D screen requires projection of the data onto a 2D plane Several projection models exist, with varying qualities

Honours Graphics 2008 - slide 1
01 / 16Honours Graphics 2008
1 / 17

Télécharger la présentation

Honours Graphics 2008
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Honours Graphics 2008 Session 3

  2. Today’s focus • Perspective and orthogonal projection • Quaternions • Graphics camera

  3. Projections • Visualizing 3D data on a 2D screen requires projection of the data onto a 2D plane • Several projection models exist, with varying qualities • We’re interested in orthogonal and perspective projection

  4. Perspective projection

  5. Perspective projection, cont. • Starting from world coordinate space:

  6. Increasing focal length and distance of the camera to infinity changes perspective into orthogonal projection

  7. Orthogonal projection • Flat, 2D projection • Used when precise profiles or measurements need to be displayed • Special case of perspective projection, when focal length approaches infinity

  8. Quaternions • Developed by Sir William Rowan Hamilton in 1843 • Generally superceded by vectors and matrices, but still very useful in applied mathematics and computer graphics • Specifically useful to compute 3D rotations • Consists of scalar and “vector” components

  9. Quaternions, cont. • Defined as an extension to the complex numbers: three components i, j and k all are squareroots of -1, hence • Furthermore

  10. Quaternions, cont. • Finally • Quaternion addition and subtraction

  11. Quaternions, cont. • Magnitude of a quaternion • Quaternion multiplication

  12. Quaternions, cont. • For graphics purposes a unit quaternion is used, which has the property that • Unit quaternions represent rotation / orientation

  13. Quaternions, cont. • Quaternion to rotation matrix conversion

  14. Graphics camera • Both DirectX and OpenGL expose camera parameters that consist of • View position • View target • Relative view-up direction

  15. Camera commands • OpenGLvoid gluLookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ ) • DirectXD3DXMatrixLookAtLH(mat, eye, center, up);DX9Device.SetTransform(D3DTS_VIEW, mat);

  16. Homework • Write a camera library that makes use of quaternions. Allow for keyboard and mouse input to control the camera. • For next session