%begin
   %include "inc:maths.imp"
   %include "mach:extl1.imp"
   %const %integer cx=344, cy=256
   %integer i, j, c, cb, size, in, out, n
   %real %array x, y(1:128)
   clear
   offset(0,0)
   cb = 0
   prompt("number of points(<=25) :")
   read(n) %until 2<=n<=64
   prompt("outer ratio of arms to body :")
   read(out) %until out>0
   prompt("inner ratio ofarms to body :")
   read(in) %until in>0
   %if in>out %start
      i = in
      in = out
      out = i
   %finish
   %for i = 2, 2, 2*n %cycle
      x(i-1) = cos(pi*(i-1)/n+pi/2)
      y(i-1) = sin(pi*(i-1)/n+pi/2)
      x(i) = cos(pi*i/n+pi/2)*out/in
      y(i) = sin(pi*i/n+pi/2)*out/in
   %repeat
   %cycle
      c = cb
      %for size = (intpt(256*in/out)-4)&\3, -4, 4 %cycle
         c = rem(c, 7)+1
         set colour(c)
         %for i = 4, 4, size %cycle
            poly(cx+intpt(x(j)*i), cy+intpt(y(j)*i)) %for j = 1, 1, 2*n
            close poly
         %repeat
      %repeat
      cb = rem(cb, 7)+1
      %for i = 1, 1, 100000 %cycle; %repeat
   %repeat
%end %of %program
