/** * @return PointSet */ public function produce() { $result = new PointSet(); foreach ($this->lowerLeft->forXUpTo($this->upperRight) as $x) { foreach ($this->lowerLeft->forYUpTo($this->upperRight) as $y) { $point = new Point($x, $y); $value = $this->getValue($point); $result->attach($point, $value); } } return $result; }