<?php
list($width, $height, $type, $attr) = getimagesize("spc.jpg");
echo "<img src=\"spc.jpg\" $attr alt=\"getimagesize() example\" />";

$cntrX = $width / 2;
$cntrY = $height / 2;
echo "<br>The center of the image is at " .$cntrX . ", " . $cntrY ;
echo '<br>Test Trig Fucntions php <br> Get all cordinates for a circle<br>';
$r = 5 ;
echo 'Radiuz == ' . $r . '<br> X, Y, PixelColour at that point.<br><br>';

$im = imagecreatefromjpeg("spc.jpg");
$Pi = pi(); 
for ($a=0; $a<=360; $a++) {

   $ax =  $r*cos($a*$Pi/180) ; //x
   $ay =  $r*sin($a*$Pi/180) ; //y 
   $PXCol = imagecolorat($im, $ax, $ay);
   echo $ax . ", " . $ay . ", " . $PXCol . "<br>";
}
?>