Computing axis of rotation