Thanks a lot!
I have also found code in these 3 places:
http://web.archive.org/web/2007012501…/GEMS/GEMS.html
http://www.ncsa.illinois.edu/People/kindr/emtc/quaternions/
http://www.euclideanspace.com/maths/algebra/…ternions/slerp/
With the help of your code and the stuff on these 3 websites, I can get an interpolation between any order of Euler angles (not just ZYX that kuka uses).