private void generateRaster(int dy, int iN, int iS, int[] axRaster, int[] azRaster, int iRaster, Rgb16[] gouraud) {
		/*
		 * Logger.debug("generateRaster\n" + "N="+ax[iN]+","+ay[iN]+","+az[iN]+"\n" +
		 * "S="+ax[iS]+","+ay[iS]+","+az[iS]+"\n");
		 */
		int xN = ax[iN], zN = az[iN];
		int xS = ax[iS], zS = az[iS];
		int dx = xS - xN, dz = zS - zN;
		int xCurrent = xN;
		int xIncrement, width, errorTerm;
		if (dx >= 0) {
			xIncrement = 1;
			width = dx;
			errorTerm = 0;
		}
		else {
			xIncrement = -1;
			width = -dx;
			errorTerm = -dy + 1;
		}

		/*
		 * Logger.debug("xN=" + xN + " xS=" + xS + " dy=" + dy + " dz=" + dz);
		 */
		int zCurrentScaled = (zN << 10) + (1 << 9);
		int roundingFactor;
		roundingFactor = dy / 2;
		if (dz < 0)
			roundingFactor = -roundingFactor;
		int zIncrementScaled = ((dz << 10) + roundingFactor) / dy;

		int xMajorIncrement;
		int xMajorError;
		if (dy >= width) {
			xMajorIncrement = 0;
			xMajorError = width;
		}
		else {
			xMajorIncrement = dx / dy;
			xMajorError = width % dy;
		}
		for (int y = 0, i = iRaster; y < dy; zCurrentScaled += zIncrementScaled, ++i, ++y) {
			axRaster[i] = xCurrent;
			azRaster[i] = zCurrentScaled >> 10;
			// Logger.debug("z=" + azRaster[y]);
			xCurrent += xMajorIncrement;
			errorTerm += xMajorError;
			if (errorTerm > 0) {
				xCurrent += xIncrement;
				errorTerm -= dy;
			}
		}
		if (gouraud != null) {
			Rgb16 rgb16Base = rgb16t1;
			rgb16Base.set(rgb16sGouraud[iN]);
			Rgb16 rgb16Increment = rgb16t2;
			rgb16Increment.diffDiv(rgb16sGouraud[iS], rgb16Base, dy);
			for (int i = iRaster, iMax = iRaster + dy; i < iMax; ++i)
				gouraud[i].setAndIncrement(rgb16Base, rgb16Increment);
			Rgb16 north = rgb16sGouraud[iN];
			Rgb16 generated = gouraud[iRaster];
			if (VERIFY) {
				if (north.getArgb() != generated.getArgb()) {
					Logger.debug("north=" + north + "\ngenerated=" + generated);
					throw new NullPointerException();
				}
				/*
				 * if (rgb16Base.getArgb() != rgb16sGouraud[iS].getArgb()) throw new NullPointerException();
				 */
			}
		}
	}