private PlotWindowView build(Boolean calculateFromScratch) {
        firePropertyChange(DialogWindowController.INIT, 0, 1);
        Points points;
        dataModel.setMainWindowModel(mainWindowModel);

        if (calculateFromScratch) {
            dataModel.setPoints(null);
            dataModel.buildPoints();
        }

        points = dataModel.getPoints();

        if (points == null) {
            return null;
        }

        MultivariateFunction function = interpolatorModel.interpolate(points, mainWindowModel.getNumberOfSpheres());
        PlotModel plotModel = new PlotModel(function, mainWindowModel.getXMin(), mainWindowModel.getXMax(),
                mainWindowModel.getYMin(), mainWindowModel.getYMax());
        firePropertyChange(DialogWindowController.CALCULATED, 0, 1);
        PlotView plotView = new PlotView();
        plotView.setTitleText("X -> Delta, Y -> Epsilon, Z -> " + mainWindowModel.getAngle());
        plotView.setModel(plotModel);
        plotView.getTask().execute();
        while (!plotView.getTask().isDone()) {
            firePropertyChange(DialogWindowController.PERCENTAGE, 0, plotView.getTask().getProgress());
        }

        firePropertyChange(DialogWindowController.DISPOSE, 0, 1);

        return new PlotWindowView(plotView);
    }