Singularities in Motion and Displacement Functions of Spatial Linkages