This is equivalent to finding the perpendicular bisector of the line segment p1p2. This can be done in four steps:
Use Axiom 1 to find the line through p1 and p2, given by P(s)=p_1+s(p_2-p_1)
Find the midpoint of pmid of P(s)
Find the vector vperp perpendicular to P(s)
The parametric equation of the fold is then: