function tri_surface_io_test03 ( node_file_name, triangle_file_name )

%*****************************************************************************80
%
%% tri_surface_io_test03() tests tri_surface_write().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 September 2008
%
%  Author:
%
%    John Burkardt
%
  dim_num = 3;
  node_num = 8;
  order_num = 3;
  triangle_num = 12;

  node_xyz = [ ...
    0.0, 0.0, 0.0; ...
    1.0, 0.0, 0.0; ...
    0.0, 1.0, 0.0; ...
    1.0, 1.0, 0.0; ...
    0.0, 0.0, 1.0; ...
    1.0, 0.0, 1.0; ...
    0.0, 1.0, 1.0; ...
    1.0, 1.0, 1.0 ];

  triangle_node = [ ...
    1, 3, 2; ...
    2, 3, 4; ...
    1, 6, 5; ...
    1, 2, 6; ...
    3, 7, 4; ...
    4, 7, 8; ...
    5, 6, 8; ...
    5, 8, 7; ...
    1, 5, 7; ...
    1, 7, 3; ...
    2, 4, 6; ...
    6, 4, 8 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'tri_surface_io_test03():\n' );
  fprintf ( 1, '  tri_surface_write() writes TRI_SURFACE data to two files.\n' );

  tri_surface_write ( node_file_name, triangle_file_name, dim_num, node_num, ...
    order_num, triangle_num, node_xyz, triangle_node );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics data was written to:\n' );
  fprintf ( 1, '    Node file:     "%s",\n', node_file_name );
  fprintf ( 1, '    Triangle file: "%s".\n', triangle_file_name );

  return
end
