1/* -*-ePiX-*- */ 2#include "epix.h" 3using namespace ePiX; 4 5double f(double t) { return 2*t*(1-t)*(1-t); } 6double g(double t) { return 1/(1-t*t); } 7 8int main() 9{ 10 picture(P(-2,-4), P(2,4), "200x200pt"); 11 12 begin(); 13 14 set_crop(); 15 // Vertical asymptotes 16 dashed(); 17 line(P(-1, ymin()), P(-1, ymax())); 18 line(P( 1, ymin()), P( 1, ymax())); 19 solid(); 20 21 // Axes 22 h_axis(8); 23 v_axis(8); 24 25 h_axis_labels(4, P(-1, 2), tl); // align top-left 26 v_axis_labels(4, P(-1, 2), tl); 27 28 // Graphs 29 plot(f, xmin(), xmax(), 80); 30 31 bold(); 32 plot(g, xmin(), xmax(), 80); // N.B. poles are sample points 33 34 end(); 35} 36