private void drawCurve(double[] intervalT) {

        if ( intervalT == null)
            return;
        double s = ( maxY + minY)/ canvasHeight;

        double m = Math.max( Math.max( Math.abs(derivativeY(intervalT[0])), Math.abs(derivativeY(intervalT[1]))),
                             Math.max( Math.abs(derivativeX(intervalT[0])), Math.abs(derivativeX(intervalT[1]))) );
        double dt = s / m;

        for (double t = intervalT[1]; t < intervalT[0]; t += dt){
            double x = (t * t) / (t * t - 1);
            double y = (t * t + 1)/(t + 2);

            int coordinateX = (int) Math.round((x) * length + centerAxisX);
            int coordinateY = (int) Math.round((-y) * length + centerAxisY);

            if ((coordinateX > 0 && coordinateX < canvasWidth) && (coordinateY > 0 && coordinateY < canvasHeight))
                bufferedImage.setRGB(coordinateX, coordinateY, 0);
        }
    }