I have an object of class TriRep which consists of 2 triangles:
X=[0; 0; 1; 1]; % vertex coordinates X
Y=[0; 1; 0; 1]; % vertex coordinates Y
TRI=[1 2 4; 1 3 4]; % specifying the triangles defined by indices into the column vector of vertex coordinates (X, Y)
TR = TriRep(TRI, X, Y) % creating 2-D triangulation representation
I would like to compute an area of one of the triangles from the 'TR' object.
Best Answer