function ring_data_print ( m, p, id )

%*****************************************************************************80
%
%% RING_DATA_PRINT prints ring data.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    11 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, the total number of points.
%
%    Input, real P(2,M), the coordinates of the points.
%
%    Input, integer ID(M), the index of the ring to which each point belongs.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'RING_DATA_PRINT:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '     I    ID           R           X           Y\n' );
  fprintf ( 1, '\n' );

  for i = 1 : m
    r = sqrt ( p(i,1)^2 + p(i,2)^2 ); 
    fprintf ( 1, '  %4d  %4d  %10.4f  %10.4f  %10.4f\n', ...
      i, id(i), r, p(i,1), p(i,2) );
  end

  return
end

