3 % small script demonstrating the possibilities of the .triagrid
class.
6 % Bernard Haasdonk 9.5.2007
9 disp(
'initializing grid by point list and triangles-vertex list');
14 params.shrink_factor = 0.9;
15 params.plot_patch = 0;
16 params.color = [1,0,0];
17 params.axis_equal = 1;
18 subplot(1,2,1), plot(g1,params);
19 title(
'line, shrink');
21 params.plot_patch = 1;
22 params.shrink_factor = 1.0;
23 params.color = [0,1,0];
24 subplot(1,2,2), plot(g1,params);
25 title(
'patch, noshrink');
27 disp(
'press key to continue');
31 disp(
'elementdata and vertexdata')
34 d = sqrt(g1.CX.^2+g1.CY.^2);
36 plot_element_data(g1,d,params);
37 title('element data');
39 dv = sin(((g1.X-0.4).^2+(g1.Y-1.0).^2)*10);
41 plot_vertex_data(g1,dv,params);
44 disp('press key to continue');
49 disp('sequence of data, please move slider')
51 params.title = 'vertex data sequence';
52 params.colorbar_location = 'WestOutside';
54 dv = zeros(g1.nvertices,ndata);
56 dv(:,d) = sin(((g1.X-0.4-0.5*d/ndata).^2+(g1.Y-1.0-0.2*d/ndata).^2)*10);
58 params.plot = @plot_vertex_data;
61 disp('press key to continue');
66 disp('demonstration of grid inspect')
70 disp('press key to continue');
74 disp('display method of grid:')
A triangular conforming grid in two dimensions.
function p = plot_sequence(varargin)
plotting a sequence of data slices on polygonal 2d grid (constructed from params if empty) and provid...