/* plot_lobatto.c plot Lobatto and basis functions */ #include #include #include #include #include "lobatto_shape.h" static GLfloat points[130][3]; static GLfloat colors[11][3] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.5, 0.5, 0.5, 0.5, 1.0, 0.5, 1.0, 0.5, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5}; static int n_points = 0; static int n = 0; static int width=800; static int height=600; static int np = 11; static double xmin = -1.0; static double xmax = 1.0; static double ymin = 99.9; static double ymax =-99.0; static float offset = 0.0; static int L_or_basis = 0; void compute_basis(int i) { double x, y, h; double z = 0.0; int j; n = 60; n_points = n; h = (xmax-xmin)/(double)(n-1); x = xmin; for(j=0; jymax) ymax=y; if(yymax) ymax=y; if(y