<?php $image=imagecreatetruecolor(100,100);//设置画布大小
//设置图像中所需颜色,
$white=imagecolorallocate($image,0xff,oxff,oxff);
$gray=imagecolorallocate($image,0xc0,oxc0,oxc0);//灰色
$darkgray=imagecolorallocate($image,0x90,ox90,ox90);//暗灰色
$navy=imagecolorallocate($image,0x00,ox00,ox80);//深蓝色
$darknavy=imagecolorallocate($image,0x00,ox00,ox50);//暗深蓝色
$red=imagecolorallocate($image,0xff,ox00,ox00);//红色
$darkred=imagecolorallocate($image,0x90,0x00,0x00);//暗红色
imagefill($image,0,0,$white);//为画布填充背景颜色//
开始制作3D效果
for($i=60;$i>50;$i--){//循环10次画出立体效果
imagefilledarc($image,50,$i,100,50,-160,40,$darknavy,IMG_ARC_PIE);
imagefilledarc($image,50,$i,100,50,40,75,$darkgray,IMG_ARC_PIE);
imagefilledarc($image,50,$i,100,50,75,200,$darkred,IMG_ARC_PIE);