Code for star

<?php
$size = $_GET['size'];/retrieve size of picture
$points=13;
$r=$size/2-4;
$c=$size/2+2;

//Order of points
$op=array(0,6,12,5,11,4,10,3,9,2,8,1,7,0,3,6,9,12,2,5,8,11,1,4,7,10,0);

//get points
for($i=0;$i<count($op);$i++){
$p[]=round($r*cos((2*M_PI)*($op[$i]/$points))+$c,0);
$p[]=round($r*sin((2*M_PI)*($op[$i]/$points))+$c,0);}

// create a blank image
$image = imagecreate($size, $size);

// fill the background color
$bg=imagecolorallocate($image, 176, 196, 222);

// choose a color for the polygon
$col = imagecolorallocate($image, 128, 128, 255);


// draw the polygon
imagefilledpolygon($image,
$p,
count($op),
$col);

// output the picture to the disk
imagepng($image, "YellowStar13.png");
?>