<?php
 header('Content-Type: image/png');


$myImage = imagecreate(300, 300); 



$white = imagecolorallocate($myImage, 255, 255, 255);
$red= imagecolorallocate($myImage, 255, 0, 0);




$ak = "5";
$al = "10";
$ar = "110";

$numbers = array("0", "3", "3", "11", "5");


if ($numbers[count($numbers)-1] < $numbers[count($numbers)-2]) { $lqlq = $ar + $ak; $ar = $ar - $ak; }
else { $lqlq = $ar; }

$myTriangle = array ($al + $ak,  $lqlq,         $al,       $ak + $ar,           $al+ ($ak*2),               $ak + $ar);

imagepolygon($myImage, $myTriangle, 3, $red);
imagefilledpolygon($myImage, $myTriangle, 3, $red);




imagepng($myImage);
imagedestroy($myImage);
?>
Published in: PHP
Download

Related snippets