Adaptive mechanisms for reconfigurable machines based on deformable cam