This patch will produce a 5 x 5 degree dashed lat-lon grid on any exisitng worldmap in VIS-5D, with a resolution of the lines at about 1 degree. If you want a different resolution, some changes in array sizes, the constants ic and jc, and for-loop sizes will be necessary. 0. Keep a copy of map.c before altering this (just in case! ) 1. Go to the part of map.c (in the src directory) where this module is: ------------------------------- /* * Draw the map. * Input: time - time step * flat - 1 = draw flat map * 0 = draw raised map * Return: nothing. */ int draw_map( Display_Context dtx, int time, int flat ) ------------------------------- 2. After this point, delete the rest of the module and insert the following: ------------------------------- { int i, nlon, nlat, ic, jc, isgn, s, icc, jcc, idc; int ii, im, jm, imln, jmlt, imxln, jmxlt; float mlb[2][3]; /* These array sizes will vary depending upon the resolution you want */ float lonmlb[100]; float latmlb[100]; float mlonp[361]; float mlatp[181]; float x[361], y[181], z[2]; float mgt[1]; if (flat) { /* draw a flat map */ for (i=0;iSegCount;i++) { polyline( dtx->FlatMapVert+dtx->Start[i], dtx->Len[i] ); /* printf("%f\n",dtx->FlatMapVert[0][2]); */ } } else { /* draw a map with heights */ for (i=0;iSegCount;i++) { polyline( dtx->MapVert+dtx->Start[i], dtx->Len[i] ); } } ic=73; for (im=0;imFlatMapVert[0][2]; mlb[1][0]=x[icc]; mlb[1][1]=y[icc]; mlb[1][2]=dtx->FlatMapVert[0][2]; if (icc % 2 != 0 && x[icc] < 1. && x[icc] > -1. && y[icc] < 1. && y[icc] > -1.) { polyline(mlb,2); } } } } for (jcc=0;jccFlatMapVert[0][2]; mlb[1][0]=x[icc]; mlb[1][1]=y[icc]; mlb[1][2]=dtx->FlatMapVert[0][2]; if (icc % 2 != 0 && x[icc] < 1. && x[icc] > -1. && y[icc] < 1. && y[icc] > -1.) { polyline(mlb,2); } } } } return 0; } -------------------------- 3. recompile VIS-5D, and you should be good to go. This isn't the cleanest or fastest code I'm sure; if someone can come up with something more efficient, please let me know. peace, Marcus ><+> marcus@aos.wisc.edu