function arrows ( X, Y, U, V )

%*****************************************************************************80
%
%% arrows displays velocity and normalized velocity fields.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 June 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(nr,nc), Y(nr,nc): the node coordinates.
%
%    real U(nr,nc), V(nr,nc): the node velocities.
%
  figure ( );
  subplot ( 1, 2, 1 );
  quiver ( X, Y, U, V );
  title ( 'Velocity field' );
  grid ( 'on' );
  axis ( 'equal' );
  axis ( 'tight' );

  UN = U ./ sqrt ( U.^2 + V.^2 );
  VN = V ./ sqrt ( U.^2 + V.^2 );

  I = find ( ( U.^2 + V.^2 ) == 0 );
  UN(I) = 0.0;
  VN(I) = 0.0;

  subplot ( 1, 2, 2 );
  quiver ( X, Y, UN, VN );
  title ( 'Direction field' );
  grid ( 'on' );
  axis ( 'equal' );
  axis ( 'tight' );

  return
end

