#include "library.h" double f(double x) { const double v = x / 100; const double y = 300 + 200*sin(v) + 25*cos(5*v); return y; } void plot(double firstx, double lastx) { if (firstx <= lastx) { print(firstx); print(" -> "); print( f(firstx) ); new_line(); draw_to(firstx, f(firstx)); plot(firstx + 1, lastx); } } void main() { make_window(800, 600); move_to(0.0, f(0)); plot(0, 600); }