PHP Version 4.3.3
Build Date Aug 24 2003 22:01:16
PHP Extension 20020429
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
<?php
$picWidth=3000;
$picHeight=3000;
$b1=4.4/1000;
$b2=1.8/1000;
$e=0.75/1000;
$m=1.5/1000;
$h=21/1000;
$mash=1000*16;
$r=157.3/1000;
$n_pazov=51;
$pic=imagecreatetruecolor($picWidth,$picHeight);
$white=ImageColorAllocate($pic,0,0,0);
$black=ImageColorAllocate($pic,255,255,255);
$gray=ImageColorAllocate($pic,64,64,64);
imagefill($pic,0,0,$white);
$sdvig=$picWidth/2;
imagearc ($pic, $sdvig, $sdvig, $r*$mash, $r*$mash, 0, 360, $gray);
imagearc ($pic, $sdvig, $sdvig, $r*$mash-2*$e*$mash, $r*$mash-2*$e*$mash, 0, 360, $gray);
imagearc ($pic, $sdvig, $sdvig, $r*$mash-2*$e*$mash-$b1*$mash, $r*$mash-2*$e*$mash-$b1*$mash, 0, 360, $gray);
imagearc ($pic, $sdvig, $sdvig, $r*$mash-2*$e*$mash-2*$h*$mash+$b1*$mash, $r*$mash-2*$h*$mash+$b2*$mash, 0, 360, $gray);
function paz($deg){
global $sdvig;
global $pic; global $black; global $mash; global $b1; global $b2; global $e; global $m; global $h; global $r;
$red=ImageColorAllocate($pic,255,128,0);
$blue=ImageColorAllocate($pic,0,128,255);
$x=$sdvig+0.5*$r*$mash*cos(deg2rad($deg));
$y=$sdvig+0.5*$r*$mash*sin(deg2rad($deg));
imagesetpixel($pic,$x,$y,$black);
$x1=$x+0.5*$m*$mash*sin(deg2rad($deg));
$y1=$y-0.5*$m*$mash*cos(deg2rad($deg));
$x2=$x+0.5*$m*$mash*sin(deg2rad($deg))-$e*$mash*cos(deg2rad($deg));
$y2=$y-0.5*$m*$mash*cos(deg2rad($deg))-$e*$mash*sin(deg2rad($deg));
imagesetpixel($pic,$x1,$y1,$red);
imagesetpixel($pic,$x2,$y2,$blue);
imageline($pic,$x1,$y1,$x2,$y2,$black);
$x1=$x-0.5*$m*$mash*sin(deg2rad($deg));
$y1=$y+0.5*$m*$mash*cos(deg2rad($deg));
$x2=$x-0.5*$m*$mash*sin(deg2rad($deg))-$e*$mash*cos(deg2rad($deg));
$y2=$y+0.5*$m*$mash*cos(deg2rad($deg))-$e*$mash*sin(deg2rad($deg));
imageline($pic,$x1,$y1,$x2,$y2,$black);
$x1=$x-(0.5*$b1+$e)*$mash*cos(deg2rad($deg));
$y1=$y-(0.5*$b1+$e)*$mash*sin(deg2rad($deg));
$Ddeg=rad2deg(($m/2)/($b1/2));
imagesetpixel($pic,$x1,$y1,$red);
imagearc ($pic, $x1, $y1, $b1*$mash, $b1*$mash, $deg+$Ddeg, $deg+90, $black);
imagearc ($pic, $x1, $y1, $b1*$mash, $b1*$mash, $deg+270, $deg-$Ddeg, $black);
$x1=$x-($e+$h-$b2/2)*$mash*cos(deg2rad($deg));
$y1=$y-($e+$h-$b2/2)*$mash*sin(deg2rad($deg));
imagesetpixel($pic,$x1,$y1,$red);
imagearc ($pic, $x1, $y1, $b2*$mash, $b2*$mash, $deg+90, $deg-90, $black);
$x2=$x-(0.5*$b1+$e)*$mash*cos(deg2rad($deg));
$y2=$y-(0.5*$b1+$e)*$mash*sin(deg2rad($deg));
imageline($pic,$x1,$y1,$x2,$y2,$red);
}
for ($deg=0;$deg<360;$deg+=360/$n_pazov){
$x=$sdvig+$picWidth/2*cos(deg2rad($deg));
$y=$sdvig+$picWidth/2*sin(deg2rad($deg));
imageline($pic,$sdvig,$sdvig,$x,$y,$gray);
paz ($deg);
}
Header("Content-type: image/png");
ImagePng($pic);
?>