private void renderTexture(int width, int height, int gridPointDensity, int lineDensity) {
		_textureTop = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
		_textureBottom = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
		
		OneParameterSubgroup oneParameterSubgroup = null;
		if (_mobiusTransformation.isIdentity()) {
			drawGrid(gridPointDensity);
			return;
		} else if (_mobiusTransformation.isParabolic()) {
			drawGrid(gridPointDensity);
			return;
		}
		try {
			oneParameterSubgroup = _mobiusTransformation.oneParameterSubgroup();
		} catch (Exception e) {
			System.out.println("Mobius Transformation is not loxodromic, or elliptic.");
			return;
		}
		
		// Draw lines of motion, for each point on the grid
		for (int i = 0; i < gridPointDensity; i++) {
			for (int j = 0; j < gridPointDensity; j++) {
				double theta = (double) i * Math.PI / (double) (gridPointDensity - 1);
				double phi = (double) j * Math.PI * 2.0 / (double) (gridPointDensity - 1);
				HomCoords2D homCoordsOfGridPoint = HomCoords2D.computeHomCoords(theta, phi);
				HomCoords2D previousHomCoords = homCoordsOfGridPoint;
				Color colour = Color.cyan;
				for (int k = 1; k <= lineDensity; k++) {
					double t = (double) k / (double) lineDensity;
					
					GL2C mobiusTMatrix = oneParameterSubgroup.mobiusAtParameter(t);
					MobiusTransformation mobiusTransformationAtT = new MobiusTransformation(mobiusTMatrix);
					HomCoords2D homCoordsPrime = mobiusTransformationAtT.evaluate(homCoordsOfGridPoint);
					
					// Draw a line between the previous point and the evaluated point.
					drawLine(previousHomCoords, homCoordsPrime, _textureTop, _textureBottom, colour);
					
					double r = (double) colour.getRed();
					double g = (double) colour.getGreen();
					double b = (double) colour.getBlue();
//					colour = new Color((int) (r * (1.0 - t / 2.0)), (int) (g * (1.0 - t / 2.0)), (int) (b * (1.0 - t / 2.0)));
					
					previousHomCoords = homCoordsPrime;
				}
				
				// Draw an arrowhead:
				double t0 = 0.4;
				GL2C mobiusTMatrix = oneParameterSubgroup.mobiusAtParameter(t0);
				MobiusTransformation mobiusTransformationAtT = new MobiusTransformation(mobiusTMatrix);
				HomCoords2D homCoordsStart = mobiusTransformationAtT.evaluate(homCoordsOfGridPoint);
				double t1 = 0.5;
				mobiusTMatrix = oneParameterSubgroup.mobiusAtParameter(t1);
				mobiusTransformationAtT = new MobiusTransformation(mobiusTMatrix);
				HomCoords2D homCoordsEnd = mobiusTransformationAtT.evaluate(homCoordsOfGridPoint);
				drawArrowHead(homCoordsStart, homCoordsEnd, _textureTop, _textureBottom, Color.orange, Math.PI / 100.0);
				
				// If at the north or south poles, then just do iteration of j.
				if (i == 0 || i == gridPointDensity - 1)
					break;
			}
		}
		
		// Draw the fixed points of the transformation:
		HomCoords2D fixedPoint1 = oneParameterSubgroup.fixedPoint1();
		HomCoords2D fixedPoint2 = oneParameterSubgroup.fixedPoint2();
		drawCircle(fixedPoint1, 12, Color.green);
		drawCircle(fixedPoint2, 12, Color.green);

		drawGrid(gridPointDensity);
	}