static Pt avgPoint(Pt a, Pt b) { ret new Pt((a.x+b.x)/2, (a.y+b.y)/2); }