/* plot_laphi.c plot Lagrange Phi functions */ #include #include #include #include #include "laphi.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 double xg[11] = {-0.5, -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5}; static int np = 11; static double xmin = -0.5; static double xmax = 0.5; static double ymin = 99.0; static double ymax = -99.0; static float offset = 0.0; static int ifphi = 1; void compute_phi(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