/////////////////////////////////////////////////// // Olympiad Asymptote Package // By Maria Monks and AoPS community // Last Updated: 08/26/2007 ///////////////////////////////////////////////////// // This package contains many constructions and calculations // that often come up in Olympiad-level Geometry problems. // include graph; include math; real markscalefactor=0.03; /////////////////////////////////////////// // USEFUL POINTS /////////////////////////////////////////// // Substitutes origin for (0,0) for ease of notation: pair origin; origin=(0,0); // The point r of the way along path p with respect to arc length, where r is a real value between 0 and 1 inclusive: pair waypoint(path p, real r) { return point(p,reltime(p,r)); } // The midpoint of path p: pair midpoint(path p){ return waypoint(p,.5);} // The foot of the perpendicular from P to line AB: pair foot(pair P,pair A, pair B) { real s; s=dot(P-A,unit(B-A)); return (scale(s)*unit(B-A)+A); } // The point on the angle bisector of 0) { direct=unit(dir(g,arctime(g,r*l))); startpt=r*l-(n-1)/2*space; for (int i=0; i