% gen_triquad.m
function gen_triquad()
  clear
  format compact
  diary 'gen_triquad.out'
  disp('gen_triquad.out  area * sum W * f(X,Y)')
  vert=[0 0; 0 1; 1 0]
  for k=1:6
    [X Y WX WY] = triquad(k,vert);
    disp(['order ' num2str(k) ', X Y WX WY'])
    for i=1:k
      for j=1:k
        disp(['{' num2str(X(i,j)) ', ' num2str(Y(i,j)) ', ' ... 
              num2str(2.0*WX(i)*WY(j)) '}' ])
      end
    end
  end
  diary off
  for k=1:4
    [X Y WX WY] = triquad(k,vert);
    disp(['order ' num2str(k) ', X Y WX WY'])
    for i=1:k
      for j=1:k
        disp([num2str(i) ', ' num2str(j) '  ' ...
              num2str(X(i,j)) ', ' num2str(Y(i,j)) ', ' ...
              num2str(WX(i)) ',  ' num2str(WY(j)) ', W=' ...
              num2str(2.0*WX(i)*WY(j))])
      end
    end
  end
end % gen_triquad