function bezier_surface_test01 ( )

%*****************************************************************************80
%
%% bezier_surface_test01() tests routines to read a Bezier surface definition.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 June 2006
%
%  Author:
%
%    John Burkardt
%
  node_file_name = 'teapot_nodes.txt';
  rectangle_file_name = 'teapot_rectangles.txt';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'bezier_surface_test01():\n' );
  fprintf ( 1, '  BEZIER_SURFACE_NODE_SIZE determines the number of\n' );
  fprintf ( 1, '  nodes in a Bezier surface node file.\n' );
  fprintf ( 1, '  BEZIER_SURFACE_NODE_READ reads the\n' );
  fprintf ( 1, '  nodes in a Bezier surface node file.\n' );
  fprintf ( 1, '  BEZIER_SURFACE_RECTANGLES_SIZE determines the number of\n' );
  fprintf ( 1, '  rectangles in a Bezier surface rectangle file.\n' );
  fprintf ( 1, '  BEZIER_SURFACE_RECTANGLES_READ reads the\n' );
  fprintf ( 1, '  rectangles in a Bezier surface rectangle file.\n' );
%
%  Get the number of nodes, allocate space for them, and read them in.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Read surface node information from "%s"\n', node_file_name );
  node_xyz = load ( node_file_name );
  node_num = size ( node_xyz, 1 );
  fprintf ( 1, '  There are %d surface nodes\n', node_num );
  r8mat_print ( node_num, 3, node_xyz, '  Bezier surface node coordinates:' );
%
%  Get the number of rectangles, allocate space for them, and read them in.
%
  fprintf ( 1, '  Read surface rectangle information from "%s"\n', ...
    rectangle_file_name );
  rectangle_node = load ( rectangle_file_name );
  rectangle_num = size ( rectangle_node, 1 );
  rectangle_dim = size ( rectangle_node, 2 );
  fprintf ( 1, '  There are %d surface rectangles\n', rectangle_num );
  i4mat_print ( rectangle_num, rectangle_dim, rectangle_node, ...
    '  Bezier surface rectangles:' );

  return
end
