function renderImageArcsin() { $imagick = new \Imagick(); $imagick->newPseudoImage(500, 500, 'gradient:black-white'); $arguments = array($this->control->getFirstTerm()); $secondTerm = $this->control->getSecondTerm(); $thirdTerm = $this->control->getThirdTerm(); $fourthTerm = $this->control->getFourthTerm(); if (strlen($secondTerm)) { $arguments[] = $secondTerm; if (strlen($thirdTerm)) { $arguments[] = $thirdTerm; if (strlen($fourthTerm)) { $arguments[] = $fourthTerm; } } } $imagick->functionImage(\Imagick::FUNCTION_ARCSIN, $arguments); $imagick->setimageformat('png'); analyzeImage($imagick, 512, 256); }