gm_polytri.m
来自「算断裂的」· M 代码 · 共 16 行
M
16 行
function [varargout]=gm_polytri(varargin)%% gm_polytri computes the constrained Delaunay triangulation of a polygon%% Tcl/Tk: gmset trilist [gm_polytri $coord $edgelist]%% Matlab: trilist = gm_polytri(coord, edgelist);%% This routine triangulates a planar polygon. The matrix coord holds%% the coordinates of the polygons vertices, one vertex per row. The%% matrix edgelist has a row for each edge of the polygon. Each row%% consists of two integers which index the two vertices (i.e., rows%% of the coord matrix) at either end of the edge. The return argument%% trilist is an matrix of triangles in the triangulation. Each row of%% this matrix is one triangle. A row consists of three integers which%% index the three vertices of the triangle. The triangulation computed%% by this routine is the constrained Delaunay triangulation. It uses%% an unpublished O(n^2 log n) algorithm which is fairly robust.gm_errmsg('gm_polytri')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?