function triangulation_test13 ( )

%*****************************************************************************80
%
%% triangulation_test13 tests triangulation_order3_boundary_edge_count and triangulation_order3_plot.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 August 2006
%
%  Author:
%
%    John Burkardt
%
  dim_num = 2;
  node_num = 36;
  triangle_num = 41;

  file_name = 'triangulation_order3_plot2.eps';
  node_show = 2;
  node_xy(1:dim_num,1:node_num) = [ ...
    0.0, 0.0; ...
    1.0, 0.0; ...
    2.0, 0.0; ...
    3.0, 0.0; ...
    4.0, 0.0; ...
    5.0, 0.0; ...
    0.0, 1.0; ...
    1.0, 1.0; ...
    2.0, 1.0; ...
    3.0, 1.0; ...
    4.0, 1.0; ...
    5.0, 1.0; ...
    0.0, 2.0; ...
    1.0, 2.0; ...
    2.0, 2.0; ...
    3.0, 2.0; ...
    4.0, 2.0; ...
    5.0, 2.0; ...
    0.0, 3.0; ...
    1.0, 3.0; ...
    2.0, 3.0; ...
    3.0, 3.0; ...
    4.0, 3.0; ...
    5.0, 3.0; ...
    0.0, 4.0; ...
    1.0, 4.0; ...
    2.0, 4.0; ...
    3.0, 4.0; ...
    0.0, 5.0; ...
    1.0, 5.0; ...
    2.0, 5.0; ...
    3.0, 5.0; ...
    0.0, 6.0; ...
    1.0, 6.0; ...
    2.0, 6.0; ...
    3.0, 6.0 ]';
  triangle_node(1:3,1:triangle_num) = [ ...
     1,  8,  7; ...
     1,  2,  8; ...
     2,  9,  8; ...
     2,  3,  9; ...
     3, 10,  9; ...
     3,  4, 10; ...
     4, 11, 10; ...
     4,  5, 11; ...
     5, 12, 11; ...
     5,  6, 12; ...
     7, 14, 13; ...
     7,  8, 14; ...
     8, 15, 14; ...
     8,  9, 15; ...
    11, 18, 17; ...
    11, 12, 18; ...
    13, 20, 19; ...
    13, 14, 20; ...
    14, 21, 20; ...
    14, 15, 21; ...
    15, 22, 21; ...
    15, 16, 22; ...
    16, 23, 22; ...
    16, 17, 23; ...
    17, 24, 23; ...
    17, 18, 24; ...
    19, 26, 25; ...
    19, 20, 26; ...
    21, 28, 27; ...
    21, 22, 28; ...
    25, 30, 29; ...
    25, 26, 30; ...
    26, 31, 30; ...
    27, 32, 31; ...
    27, 28, 32; ...
    29, 34, 33; ...
    29, 30, 34; ...
    30, 35, 34; ...
    30, 31, 35; ...
    31, 36, 35; ...
    31, 32, 36 ]';
  triangle_show = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangulation_test13\n' );
  fprintf ( 1, '  TRIANGULATION_ORDER3_BOUNDARY_EDGE_COUNT counts the\n' );
  fprintf ( 1, '  boundary edges in an order 3 triangulation.\n' );
  fprintf ( 1, '  TRIANGULATION_ORDER3_PLOT plots the triangulation.\n' );

  triangulation_order3_plot ( file_name, node_num, node_xy, ...
    triangle_num, triangle_node, node_show, triangle_show );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  An Encapsulated PostScript image of this\n' );
  fprintf ( 1, '  triangulation is in "%s".\n', file_name );

  boundary_edge_num = triangulation_order3_boundary_edge_count ( ...
    triangle_num, triangle_node );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of boundary edges = %d\n', boundary_edge_num );
  fprintf ( 1, '  Correct number =           %d\n', 33 );

  return
end
