An algorithmic approach to coordinate transformation for robotic manipulators