Its a bit more complicated as you think. When walking on spheres you will have some trouble with the gimbal lock phenomenon. The 3rd URL doesnt deal with spheres, but I tell Kihaku a bit more about gimbal lock. Read the related Wikipedia article to understand it.