public void run() {
        System.out.println("renderThread is rendering");
        int picareax =1024;
        int picareay =1024;
        if (size > 0) picareax = picareay = 1024 * size;
        BufferedImage image = new BufferedImage(picareax, picareay, BufferedImage.TYPE_INT_RGB);
        Graphics w = image.createGraphics();
            double Dx = (reel_max - reel_min) / picareax;
            double Dy = (imag_max - imag_min) / picareay;
            int currentAreaY = picareay;
            int currentAreaX = picareax;
        //Dx = -0.00357142857142857142857142857143;
        //Dy = -0.00357142857142857142857142857143;
        double p0;
        double q0;
        double x = reel_min;
        double y = imag_min;
        double p1;
        double q1;
        double LIMIT = 20.0;
        int LOOP_LIMIT = coloring.length*255;
        int count;
        double dpcnt; //Delta percent
        dpcnt = 99.99/currentAreaY;
        prcnt = 0;
        for (int i = 0; i < currentAreaY; i++) {
            prcnt = prcnt + dpcnt;
            for (int j = 0; j < currentAreaX; j++) {
                count = 0;
                p0 = x;
                q0 = y;
                for (int k = 0; Math.abs(p0) <= LIMIT && Math.abs(q0) <= LIMIT && k < LOOP_LIMIT; k++) {
                    p1 = p0 * p0 - q0 * q0 + x;
                    q1 = 2 * p0 * q0 + y;
                    p0 = p1;
                    q0 = q1;
                    count++;
                }
                if (Math.abs(p0) < LIMIT && Math.abs(q0) < LIMIT) {
                    w.setColor(Color.black);
                } else {
                    w.setColor(AdvColorPix(count, coloring));
                }
                w.drawLine(j, i, j, i);
                x = x + Dx;
            }
            x = reel_min;
            y = y + Dy;
        }
        prcnt = -1;
        print(image, filename);
        prcnt = 100;
        System.out.println("renderThread completed");
    }