.PS .fam H define hatch_circle { pi = atan2(0, -1) start = $1 end = start + 6 opposite = 2 * start + 16 for i = start to end do { dxr = circlerad * cos(i * pi/16) dyr = circlerad * sin(i * pi/16) dxl = circlerad * cos((opposite-i) * pi/16) dyl = circlerad * sin((opposite-i) * pi/16) line from last circle.c + (dxr, dyr) \ to last circle.c + (dxl, dyl) colour "$2" line from last circle.c + (-dxr, -dyr) \ to last circle.c + (-dxl, -dyl) colour "$2" } } circle outline "red" hatch_circle(0, red) circle with .c at last circle.c + (circlerad, 0) outline "blue" hatch_circle(4, blue) circle with .c at last circle.c + (-circlerad/2, -circlerad) outline "green" hatch_circle(8, green) .PE