boolean showTerrain=false; int n=64; // size of grid. Must be >2! p3[][] G = new p3 [n][n]; // array of vertices v3[][] L = new v3 [n][n]; // laplace vectors for smoothing float w,h,ww,hh; // width, height of cell in absolute and normalized units //float ax=342, az=1557; // camera angles float ax=800, az=0; // camera angles boolean showImage=false; float zmax=400, zmin=0; void initTerrain() { ww=1.0/(n-1); hh=1.0/(n-1); // set intial width and height of a cell w=height*ww; h=height*hh; // set intial width and height of a cell in normalized [0,1]x[0,1] resetVertices(); } void resetVertices() { for (int i=0; i