function endpoints ()
  
  lut = makelut (@__endpoints_fun__, 3);
  
  fp = fopen ('lut.txt', 'wt');
  fprintf (fp, '      lut = logical ([');
  for i=1:16
    for j=1:32
      fprintf (fp, '%d;', lut((i-1)*32+j));
    end
    if (i != 16)
      fprintf (fp, '\n                      ');
    else
      fprintf (fp, ']);\n');
    end
  end
  
  fclose (fp);
  
  end
