public void update() throws IOException {
		Projection lProjection = null;
		Shader lShader = null;
		BitGeneratorMap lScanner = null;
		if (fConf.is("projection", "Cylindrical")) {
			lProjection = new ProjectionCyl();
			lScanner = new BitGeneratorMapDefault(lProjection);
			lShader = new ShaderDefault();
		}

		if (fConf.is("projection", "Mercator")) {
			lProjection = new ProjectionMerc();
			lScanner = new BitGeneratorMapDefault(lProjection);
			lShader = new ShaderDefault();
		}

		if (fConf.is("projection", "Orthographic")) {
			lProjection = new ProjectionOrtho();
			lScanner = new BitGeneratorMapOrtho(lProjection);
			lShader = new ShaderOrtho();
		}

		computePositions();
		lProjection.setImageWidth(fConf.getInt("imageWidth"));
		lProjection.setImageHeight(fConf.getInt("imageHeight"));
		lProjection.setShiftX(fConf.getInt("shiftX"));
		lProjection.setShiftY(fConf.getInt("shiftY"));
		lProjection.setViewMagnification(fConf.getDouble("viewMagnification"));
		lProjection.setViewPos(fViewPos);
		lProjection.setViewRotation(fViewRotation);

		lScanner.setImageWidth(fConf.getInt("imageWidth"));
		lScanner.setImageHeight(fConf.getInt("imageHeight"));
		lScanner.setMapData(MapDataReader.readMapData());
		// Process the map (produces ScanBit-s).
		lScanner.generateScanBits();

		// Process stars and lines (produces ScanDots-s).
		List lScanDots = new ArrayList();
		if (fConf.getBoolean("starsP")) {
			ScanDotGenerator lGenerator = new DotGeneratorStars(fConf.getInt("imageWidth"),
					fConf.getInt("imageHeight"), fConf.getDouble("starFrequency"), fConf.getInt("bigStars"), new Random(fCurrentTime));
			lGenerator.generateScanDots();
			lScanDots.addAll(lGenerator.getScanDots());
		}

		if (fConf.getBoolean("gridP")) {
			ScanDotGenerator lGenerator = new DotGeneratorLines(lProjection, fConf.getInt("gridDivision"), fConf
					.getInt("gridPixelDivision"));
			lGenerator.generateScanDots();
			lScanDots.addAll(lGenerator.getScanDots());
		}

		final CTSort lSort = new QuickSort();
		ScanDot[] lScanDotsArray = (ScanDot[]) lScanDots.toArray(new ScanDot[0]);
		lSort.sort(lScanDotsArray);

		if (!fConf.getBoolean("shadeP")) {
			lShader = new ShaderFlat();
		}
		lShader.setProjection(lProjection);
		lShader.setSunPos(fConf.getSunPos());
		lShader.setDaySideBrightness(fConf.getInt("daySideBrightness"));
		lShader.setTerminatorDiscontinuity(fConf.getInt("terminatorDiscontinuity"));
		lShader.setNightSideBrightness(fConf.getInt("nightSideBrightness"));
		lShader.init();

		Renderer lRenderer = new Renderer(fCanvas);

		RowTypeRendererScanBit lRowRendererScanBit = new RowTypeRendererScanBit();
		lRowRendererScanBit.setScanBits(lScanner.getScanBits());
		lRenderer.addRowTypeRenderer(lRowRendererScanBit);

		RowTypeRendererScanDot lRowRendererScanDot = new RowTypeRendererScanDot();
		lRowRendererScanDot.setScanDots(lScanDotsArray);
		lRenderer.addRowTypeRenderer(lRowRendererScanDot);

		lRenderer.setShader(lShader);
		lRenderer.render();

		// Apply plugins
		Iterator lIt = fPlugins.iterator();
		while (lIt.hasNext()) {
			Plugin lPlugin = (Plugin) lIt.next();
			lPlugin.setProjection(lProjection);
			lPlugin.setRenderTarget(fCanvas);
			lPlugin.setParent(this);
			lPlugin.render();
		}

	}