function [ node_xy, triangle_node, triangle_neighbor ] = ... triangulation_order6_example2 ( node_num, triangle_num ) %*****************************************************************************80 % %% TRIANGULATION_ORDER6_EXAMPLE2 sets up a sample triangulation. % % Discussion: % % This triangulation is actually a Delaunay triangulation. % % The appropriate input values of NODE_NUM and TRIANGLE_NUM can be % determined by calling TRIANGULATION_ORDER6_EXAMPLE2_SIZE first. % % Diagram: % % 21-22-23-24-25 % |\ 6 |\ 8 | % | \ | \ | % 16 17 18 19 20 % | \ | \ | % | 5 \| 7 \| % 11-12-13-14-15 % |\ 2 |\ 4 | % | \ | \ | % 6 7 8 9 10 % | 1 \ | 3 \ | % | \| \| % 1--2--3--4--5 % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 03 January 2006 % % Author: % % John Burkardt % % Parameters: % % Input, integer NODE_NUM, the number of nodes. % % Input, integer TRIANGLE_NUM, the number of triangles. % % Output, real NODE_XY(2,NODE_NUM), the coordinates of the nodes. % % Output, integer TRIANGLE_ORDER(6,TRIANGLE_NUM), the nodes that make up % the triangles. % % Output, integer TRIANGLE_NEIGHBOR(3,TRIANGLE_NUM), the triangle neighbors % on each side. Negative values indicate edges that lie on the exterior. % node_xy(1:2,1:node_num) = [ ... 0.0, 0.0; ... 1.0, 0.0; ... 2.0, 0.0; ... 3.0, 0.0; ... 4.0, 0.0; ... 0.0, 1.0; ... 1.0, 1.0; ... 2.0, 1.0; ... 3.0, 1.0; ... 4.0, 1.0; ... 0.0, 2.0; ... 1.0, 2.0; ... 2.0, 2.0; ... 3.0, 2.0; ... 4.0, 2.0; ... 0.0, 3.0; ... 1.0, 3.0; ... 2.0, 3.0; ... 3.0, 3.0; ... 4.0, 3.0; ... 0.0, 4.0; ... 1.0, 4.0; ... 2.0, 4.0; ... 3.0, 4.0; ... 4.0, 4.0 ]'; triangle_node(1:6,1:triangle_num ) = [ ... 1, 3, 11, 2, 7, 6; ... 13, 11, 3, 12, 7, 8; ... 3, 5, 13, 4, 9, 8; ... 15, 13, 5, 14, 9, 10; ... 11, 13, 21, 12, 17, 16; ... 23, 21, 13, 22, 17, 18; ... 13, 15, 23, 14, 19, 18; ... 25, 23, 15, 24, 19, 20 ]'; triangle_neighbor(1:3,1:triangle_num) = [ ... -1, 2, -1; ... 5, 1, 3; ... -1, 4, 2; ... 7, 3, -1; ... 2, 6, -1; ... -1, 5, 7; ... 4, 8, 6; ... -1, 7, -1 ]'; return end