255 ) { $red = $red-255; } ## if ( $green < 0 ) { $green = 255+$green; } if ( $green > 255 ) { $green = $green-255; } ## if ( $blue < 0 ) { $blue = 255+$blue; } if ( $blue > 255 ) { $blue = $blue-255; } ## allocate color $circle_color = imagecolorallocate($im, $red, $green, $blue ); $width = $width+$size_change; $height = $height+$size_change; imagefilledarc( $im, $x, $y, $width, $height, 0, 360, $circle_color, IMG_ARC_PIE+IMG_ARC_NOFILL ); } for ($count=$halfway; $count<=$end; $count = $count+$increment ) { # basic formula is: radius = 3sin(theta) $r = sin( $lobe*deg2rad( $count ) ); # convert from polar to coordinate $x = $r * ( cos( deg2rad( $count ) ) ); $y = $r * ( sin( deg2rad( $count ) ) ); # results are only from 0 to 1 so multiply by 175 # Add 200 to center $x = ($x * 175)+($im_width/2); $y = ($y * 175)+($im_height/2); ## step colors $red = $red+$red_step; $green = $green+$green_step; $blue = $blue+$blue_step; ## loop color if too big or small if ( $red < 0 ) { $red = 255+$red; } if ( $red > 255 ) { $red = $red-255; } ## if ( $green < 0 ) { $green = 255+$green; } if ( $green > 255 ) { $green = $green-255; } ## if ( $blue < 0 ) { $blue = 255+$blue; } if ( $blue > 255 ) { $blue = $blue-255; } ## allocate color $circle_color = imagecolorallocate($im, $red, $green, $blue ); $width = $width-$size_change; $height = $height-$size_change; imagefilledarc( $im, $x, $y, $width, $height, 0, 360, $circle_color, IMG_ARC_PIE+IMG_ARC_NOFILL ); } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); imagejpeg($im); imagedestroy($im); ?>