@Override
    public void drawImage(Function f, MyPanel image, double x, double y) {
        Graphics g = image.getGraphics();
        Graphics2D g2 = (Graphics2D) g;
        g2.translate(150, 150);
        g2.scale(x, y);

        Complex tmp1 = f.evaluate(this.c1);
        int p = 10;
        
        for (int t = 0; t <= p; t++) {
            double re = ((p - t) * this.c1.getRe() / p + t * this.c2.getRe() / p);
            double im = ((p - t) * this.c1.getIm() / p + t * this.c2.getIm() / p);
            Complex tmp2 = f.evaluate(new Complex(re, im));
            Line tmpLine = new Line(tmp1, tmp2);
            tmpLine.paint(g2);
            tmp1 = tmp2;
        }

    }