From: sivabalan N on
Hai Friends!!
i have created triangles using delaunay triangle command from X, Y points..
MY COMMANDS ARE:
>> x = randn(1,12); % generates 12 normally distributed numbers
>> y = randn(1,12);
>> z = zeros(1,12); % trimesh (used below) needs three arguments
>> plot(x,y,'o');
>> tri = delaunay(x,y);
>> hold on, trimesh(tri,x,y,z), hold off; % plot triangles
>> hidden off %reveal all hidden points
>> title(‘deLaunay Triangulation')
now my quesation: how can i get the X Y Z cordinates (vertex)of each of the out triangle alone?
is there any commands available means please guide me friends.....
From: Steven Lord on

"sivabalan N" <nshivabalan(a)gmail.com> wrote in message
news:hpevhm$kji$1(a)fred.mathworks.com...
> Hai Friends!!
> i have created triangles using delaunay triangle command from X, Y
> points..
> MY COMMANDS ARE:
>>> x = randn(1,12); % generates 12 normally distributed numbers
>>> y = randn(1,12);
>>> z = zeros(1,12); % trimesh (used below) needs three arguments
>>> plot(x,y,'o');
>>> tri = delaunay(x,y);
>>> hold on, trimesh(tri,x,y,z), hold off; % plot triangles
>>> hidden off %reveal all hidden points
>>> title(&#8216;deLaunay Triangulation')
> now my quesation: how can i get the X Y Z cordinates (vertex)of each of
> the out triangle alone?
> is there any commands available means please guide me friends.....

You have the coordinates of the points in the variables x, y, and z. You
have the indices of the points that make up each triangle in tri. Combine
them.

x(tri(1, :))
y(tri(1, :))
z(tri(1, :))

If you no longer have x, y, z, and/or tri then you can extract the data from
the various *Data properties and the Faces property of the graphics object
assuming you can get a handle to it using FINDOBJ or the like.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: sivabalan N on
Thank you very much steven..
let me try ur idea and i will reply u soon..