Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions mesh/vertex_edge_adjacency.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function VE = vertex_edge_adjacency(E)
%VERTEX_EDGE_ADJACENCY Build a vertex-edge adjacency matrix for a triangle
% mesh.
%
% Input:
% E #E x 2 list of edge indices
% Output:
% VE #E x #V sparse matrix, VE(i,j) is 1 iff vertex j is in edge i
%
% Example:
% [EF,EI,uE,EMAP] = edge_flaps(F);
% VE = vertex_edge_adjacency(uE);
i = (1:size(E,1))';
j = E;
VE = sparse([i i],j,1);
end
2 changes: 1 addition & 1 deletion mesh/vertex_triangle_adjacency.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
% Input:
% F #F x 3 list of face indices
% Output:
% VT #F x #V sparse matrix, VT(i,j) is 1 iff vertex i is in face j
% VT #F x #V sparse matrix, VT(i,j) is 1 iff vertex j is in face i

i = (1:size(F,1))';
j = F;
Expand Down