%! /slw {setlinewidth} def /ed{exch def} def /rec{ /y2 ed /x2 ed /y1 ed /x1 ed /x3 x1 x2 mul dup sqrt 2 mul x1 add x2 add div def /y3 x1 x3 mul sqrt 2 mul y1 add def 0.48 slw x3 y3 x3 0 360 arc stroke 0 slw gsave 0 0 1 setrgbcolor 0 y2 y1 add 2 div y2 y1 sub 2 div -90 90 arc stroke grestore x3 1 gt{ x1 y1 x3 y3 x3 y3 x2 y2 rec rec } if }def 100 50 translate .48 slw 0 0 moveto 0 693 lineto stroke 346.5 0 346.5 90 180 arc stroke 346.5 693 346.5 180 270 arc stroke 346.5 0 346.5 693 rec showpage