change the RelativePositionConstraint to handle the multiple points case. The code is not vectorized.