public void calcFunctionData(double domainLeft, double domainRight)
	{
		double tmp;
		String var;
		
		dx = (intervalRight-intervalLeft)/steps;
		
		if(intervalLeft<domainLeft)
		{
			domainLeft = intervalLeft;
		}
		
		if(intervalRight>domainRight)
		{
			domainRight = intervalRight;
		}
		
		if(points == null)
		{
			ArrayList<DPoint> newPoints = new ArrayList<DPoint>();
			
    		for(double i=domainLeft; i<=domainRight; i+=0.0005)
    		{
    			NumberFormat nf = new DecimalFormat(".####");
    			String h = nf.format(i);
    			
    			var = term.replaceAll("x", "("+h+")");
    			tmp = Calculator.allesRechnen(var);
    			
    			newPoints.add(new DPoint(i, tmp));
    		}

    		points = newPoints;
		}
		
		if(domainLeft<points.get(0).getX())
		{
			ArrayList<DPoint> newPoints = new ArrayList<DPoint>();
			
			for(double i=domainLeft; i<points.get(0).getX(); i+=0.0005)
    		{
    			NumberFormat nf = new DecimalFormat(".####");
    			String h = nf.format(i);
    			
    			var = term.replaceAll("x", "("+h+")");
    			tmp = Calculator.allesRechnen(var);
    			
    			newPoints.add(new DPoint(i, tmp));
    		}

    		newPoints.addAll(points);
    		
    		points = newPoints;
		}
		
		if(domainRight>points.get(points.size()-1).getX())
		{
			ArrayList<DPoint> newPoints = new ArrayList<DPoint>();
			
			for(double i=points.get(points.size()-1).getX(); i<domainRight; i+=0.0005)
    		{
    			NumberFormat nf = new DecimalFormat(".####");
    			String h = nf.format(i);
    			
    			var = term.replaceAll("x", "("+h+")");
    			tmp = Calculator.allesRechnen(var);
    			
    			newPoints.add(new DPoint(i, tmp));
    		}

    		points.addAll(newPoints);
		}
	}