public synchronized void drawImage(AbstractAlgorithm imgGen, double scale) {
		BufferedImage toDraw = imgGen.generate();
		int scaledWidth = (int) (toDraw.getWidth() * scale);
		int scaledHeight = (int) (toDraw.getHeight() * scale);
		BufferedImage scaled = new BufferedImage(scaledWidth, scaledHeight,
				BufferedImage.TYPE_INT_RGB);

		for (int i = 0; i < scaledWidth; i++) {
			for (int j = 0; j < scaledHeight; j++) {
				scaled.setRGB(i, j, toDraw.getRGB((int)(i / scale),(int) (j / scale)));
			}
		}
		paintImage(scaled);
	}