Filter löschen
Filter löschen

Structured triangulation of a square domain

2 Ansichten (letzte 30 Tage)
Pieter
Pieter am 12 Apr. 2013
Good day,
I'd like to obtain a structured triangulation of a square domain. An example of my current code is:
numx=3;
numy=3;
x=0:1/numx:1;
y=0:1/numy:1;
[X,Y] = meshgrid(x,y);
tri = delaunay(X,Y);
triplot(tri,X,Y)
This works fine.
However, now I would like to extract the vertices of the triangles.
So I would like to obtain some sort of a 3D matrix which would in this case look like:
vertex(1)
0 1
0.33 1
0.33 0.66
vertex(2)
0 1
0 0.66
0.33 0.66
And so on...
Has anyone got an idea how to realize this?
Thank you in advance!

Akzeptierte Antwort

the cyclist
the cyclist am 12 Apr. 2013
I can't look at this thoroughly right now, but does
>> DT = delaunayTriangulation(X(:),Y(:))
give you what you need? See
>> doc delaunayTriangulation
to see the property list for that class of object.
  1 Kommentar
Pieter
Pieter am 12 Apr. 2013
Thank you for your reply.
The following code:
numx=3;
numy=3;
x=0:1/numx:1;
y=0:1/numy:1;
[X,Y] = meshgrid(x,y);
DT = DelaunayTri(X(:),Y(:));
triplot(DT)
DT.X
DT.Triangulation
works fine. Now I only have to combine the information from DT.X and DT.Triangulation, but that will be no problem.
Thanks again!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Delaunay Triangulation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by