Another way to generate motion primitives