public static BufferedImage perlinImage(int width, int height,int octave)
	{
		BufferedImage image = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
		Graphics2D graphics = image.createGraphics();
		float[][] perlin = GeneratePerlinNoise(GenerateWhiteNoise(width,height,(int) System.currentTimeMillis()),octave);
		for(int x=0;x<width;x++)
		{
			for(int y=0;y<height;y++)
			{
				int grayscale = (int)(255f*perlin[x][y]);
				if(grayscale<0)
					grayscale = 0;
				if(grayscale>255)
					grayscale = 255;
				//Log.debug("Grayscale ("+x+","+y+"):"+grayscale);
				graphics.setColor(new Color(grayscale,grayscale,grayscale));
				graphics.drawRect(x, y, 1, 1);
			}
		}
		graphics.dispose();
		return image;
	}