create function to get the Euler's angels; rotate the translation vector; some code refactoring and bugs fixing