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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.