/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; /* P midpt(const P& tail, const P& head) { return 0.5*(tail + head); } */ P f(double t) { return P(t, t*t); } int main() { picture(P(-1.75, 0), P(1.75, 3), "2.1 x 1.8in"); begin(); bold(); P pO(0,0), pP0(f(0.625)), pP1(f(1.5)), pN(pP1.x1(), pP0.x2()); line(P(-2, 0), P(2, 0)); line(pO, P(0,ymax())); plot(f, xmin(), xmax(), 40); line(pP1&E_1, pP1); line(pP0, pN); line(pP0, pP1); dot(f(-1), P(2, 2), "$(-1, 1)$", r); dot(f( 1), P(0,-2), "$(1, 1)$", br); label(pO, P(0,-4), "$(0, 0)$", b); label(pP0, P(-2,4), "$P_{0}$", l); label(pP1, P(-2,2), "$P_{1}$", l); label(pN, P( 2,0), "$N$", r); label(pP1, P( 4,0), "$y = x^{2}$", r); tikz_format(); end(); }