APPENDIX B

Equations

This appendix describes some important formulas and matrices referred to in the text.

B.1 3D Vectors

image

B.1.1 Spherical Coordinates

Given a point specified in Cartesian coordinates (x, y, z)T, the spherical coordinates (ρ, θ, φ) consisting of a length and two angles are

image

Given length ρ, azimuth angle φ, and elevation angle θ (assuming y is up) the Cartesian coordinates of the corresponding unit vector are

image

For unit vectors, ρ ...

Get Advanced Graphics Programming Using OpenGL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.