This is a kind of an old school trick, rarely useful nowadays, but it’s nonetheless interesting due to its simplicity and elegancy.

The main idea is about filling a table with pre-computed values of` and`

` within a certain interval, using infinitesimal rotations.We start to work in two dimensions with a clockwise rotation matrix:`

For very small rotation angles` thus we can expand our rotation matrix elements with a Taylor series around zero.`

Ignoring all the non linear terms we get something like this:

Now we can generate our values on an interval` recursively applying`

` on a unit vector`

`.`

` `

Supposing that we don’t have at hand any code or library that can compute` for an arbitrary value of`

`, we start with `

`.`

Read the rest of this entry »