Example #1
0
 /**
  * Создание массива точек по формуле Y
  */
 public function makeDots()
 {
     $start = $this->from_to[0];
     $finish = $this->from_to[1];
     $loops = $finish - $start;
     $i = 0;
     while ($i <= $loops * $this->res) {
         $x = $start + $i++ / $this->res;
         $ys = $this->calculateY($x);
         if ($ys != FALSE) {
             foreach ($ys as $y) {
                 $dot = new Dot();
                 $dot->setX($x);
                 $dot->setY($y);
                 $dot->setColor($this->color);
                 $this->dots[] = $dot;
             }
         }
     }
 }