Require that the vector defined by (q, p) is perpendicular from the vector defined by (r, p).