function state_display ( nb, ni, np, r, r_max, p_xy, p_type, header )

%*****************************************************************************80
%
%% state_display() displays the current state.
%
%  Discussion:
%
%    The state includes the circle of radius R, the points of type 1 which
%    are constrained to the circle, and the points of type 2 which are 
%    constrained to the interior of the circle.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 December 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer NB, the number of boundary points.
%
%    integer NI, the number of interior points.
%
%    integer NP, the total number of points.
%
%    real R, the radius of the circle.
%
%    real R_MAX, the radius of the plot region.
%
%    real P_XY(2,NP), the coordinates of the points.
%
%    integter P_TYPE(1,NP), the type of each point.
%    1, the point is constrained to the boundary.
%    2, the point is constrained to the interior.
%
%    string HEADER, a title for the plot.
%

%
%  Compute plot points on the circle.
%
  nc = 101;
  c_theta = linspace ( 0.0, 1.0, nc );
  c_xy(1,1:nc) = r * cos ( 2.0 * pi * c_theta(1:nc) );
  c_xy(2,1:nc) = r * sin ( 2.0 * pi * c_theta(1:nc) );
%
%  Index the boundary and interior points.
%
  circle = find ( p_type == 1 );
  disk = find ( p_type == 2 );
%
%  Display the configuration.
%
  clf ( );
  hold ( 'on' );
  plot ( c_xy(1,:), c_xy(2,:), 'k-' );
  plot ( p_xy(1,circle), p_xy(2,circle), 'r.', 'MarkerSize', 30 );
  plot ( p_xy(1,disk), p_xy(2,disk), 'b.', 'MarkerSize', 30 );
  grid ( 'on' );
  axis ( 'equal' );
  axis ( [ -r_max, +r_max, -r_max, +r_max ] );
  xlabel ( '<--X-->' );
  ylabel ( '<--Y-->' );
  title ( header );
  hold ( 'off' );

  return
end
