An angular.js experiment in calculating rotation representations