// for (i=0;i<NPTS;i++)
// System.out.printf(points[i].x[0] << " %f\n", points[i].x[1]);
Triel[] triels=new Triel[NTRI];
for(i=0;i<NTRI;i++)triels[i] = new Triel();
for (i=0;i<NTRI;i++) {
if (i%2 == 0) // Note: the triangle must be in couterclockwise
triels[i].setme(i,i+1,i+2,points); // order in order for the
else // method contains() to work
triels[i].setme(i,i+2,i+1,points); // properly