private static void drawMandelbrot(Display d) 
	{
		int max = 10;
		int max_iter = 50;
		Complex t = new Complex(0,0);
		/*Color current = new Color(d,0,0,0);*/
		int X = WIDTH/2;
		int Y = HEIGHT/2;
		for (int y = -Y; y < Y; ++y)
		{
			for (int x = -X; x < X; ++x)
			{
				Complex c = new Complex (x*0.004,y*0.004);
				Complex z = new Complex(0,0);
				int n = 0;
				while ( (Math.pow(z.getRe(),2)+Math.pow(z.getIm(),2) < max) && (n < max_iter) )
				{
					t.setRe(z.getRe());
					t.setIm(z.getIm());
					z.setRe(Math.pow(t.getRe(),2)-Math.pow(t.getIm(),2) + c.getRe());
					z.setIm(2*t.getRe()*t.getIm()+c.getIm());
					n++;
				}
				
				if (n<max_iter)
				{
					int col = max - (n % max);
					//graph.setAlpha(n * 100);
					graph.setForeground(set_palette(d,col));
					graph.drawPoint(X+x,Y+y);
				}
			}
		}

	}