#include #include "canvas.h" using namespace std; /* This program consists of the files point.h, line.h, canvas.h, canvas.C, main.C. The output of this program is in the file file.html. */ int main() { canvas c(300, 150); //Make only one canvas. Origin at upper left. point A(10, 10); point B(50, 50); point C(50, 10); point D(90, 50); try { line l(A, B); line m(C, D); point E(l, m); //intersection of two lines point F = E + offset(100, 0); //100 pixels to right of point E line n(E, F); c << black << l << m << red << n; } catch (int i) { cerr << "parallel lines have no unique point of intersection\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; }