Saturday, November 18, 2006

A bit of quaternions

I need to implement some kind of "go to" function in The Balloon Project, that is, give the user the possility to go to any position of the planet experssed in lat/lon.

Looking for information about how to do this I found (an extensive list of links) but this two resumes very well the concepts and the utility of quaternions.

  1. http://www.isner.com/tutorials/quatSpells/quaternion_spells_14.htm
  2. http://www.gamedev.net/reference/articles/article1095.asp
Expressin rotations in Euler angles are not always a good way, first because exists the gimbal lock problem and second because I want interpolate between two angles to animate the rotation of the camera from one point to other. Quaternions solves this two problems.