Numerical simulation of mechanisms and manipulator robots with flexible links and flexible joints