A new vector theory for the analysis of spatial mechanisms