% milimetricpaper.mp
% L. Nobre G.
% 2005

%%input mp-tool;

prologues := 1;

beginfig(1);
  numeric u, xsize, ysize, i;
  numeric minstep, majstep, bigstep;
  pen minpen, majpen, bigpen;
  color mincolor, majcolor, bigcolor;
  u = 1mm;
  xsize = 16cm;
  ysize = 16cm;
  minstep = 2u;
  majstep = 10u;
  bigstep = 50u;
  minpen = pencircle scaled 0pt;
  majpen = pencircle scaled 0.3pt;
  bigpen = pencircle scaled 0.8pt;
  mincolor = 0.5white;
  majcolor = 0.2white;
  bigcolor = 0.5white;
  for i=0 step minstep until xsize:
    draw (i,0)--(i,ysize) withpen minpen withcolor mincolor;
  endfor;
  for i=0 step minstep until ysize:
    draw (0,i)--(xsize,i) withpen minpen withcolor mincolor;
  endfor;
  for i=0 step bigstep until xsize:
    draw (i,0)--(i,ysize) withpen bigpen withcolor bigcolor;
  endfor;
  for i=0 step bigstep until ysize:
    draw (0,i)--(xsize,i) withpen bigpen withcolor bigcolor;
  endfor;
  for i=0 step majstep until xsize:
    draw (i,0)--(i,ysize) withpen majpen withcolor majcolor;
  endfor;
  for i=0 step majstep until ysize:
    draw (0,i)--(xsize,i) withpen majpen withcolor majcolor;
  endfor;
endfig;
end.