Contenido principal

triangulation

R2026b

Triangular polyshape

Descripción

T = triangulation(polyin) devuelve un objeto triangulation 2D de un objeto polyshape. T tiene propiedades que describen los vértices y la conectividad de los triángulos que componen polyin. Para obtener más información, consulte triangulation.

ejemplo

Ejemplos

contraer todo

Cree y triangule un polígono.

t = 0.05:0.5:2*pi;
x1 = cos(t);
y1 = sin(t);
x2 = 0.5*cos(t);
y2 = 0.5*sin(t);
polyin = polyshape({x1,x2},{y1,y2})
polyin = 
  polyshape with properties:

      Vertices: [27×2 double]
    NumRegions: 1
      NumHoles: 1

plot(polyin)

Ring-shaped polygon with a roughly circular outer boundary and a roughly circular hole in the center

T = triangulation(polyin)
T = 
  triangulation with properties:

              Points: [26×2 double]
    ConnectivityList: [26×3 double]

triplot(T)

Triangulated mesh of the ring-shaped polygon, showing triangles filling the annular region

Argumentos de entrada

contraer todo

polyshape de entrada, especificado como escalar.

Tipos de datos: polyshape

Historial de versiones

Introducido en R2017b

Consulte también

|