Application of Motor Algebra to Analysis of Robot Mechanisms