code: public void calculateEndPoints(double start, double stop) {
  
  		Point p1 = points.get(0);
  		if (p1.getX().doubleValue() != start) {
  			points.add(0, new Point(start, p1.getY()));
  		}
  
  		int end = points.size();
  		Point p2 = points.get(end - 1);
  		if (p2.getY().doubleValue() != stop) {
  			points.add(end, new Point(stop, p2.getY()));
  		}
  	}
docs: Adjust the point list so we have values at the end points
  <p>
  @param start start interval
  @param stop  end interval