-
Notifications
You must be signed in to change notification settings - Fork 3
/
embed_mesh.m
24 lines (23 loc) · 698 Bytes
/
embed_mesh.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function [flattener] = embed_mesh(V,T,inds,isdisc,forceOrder)
%main function for mesh embedding.
%V - vertices
%T - triangles
%inds - the indices of the vertices that are cones
%isdisc - boolean flag, true iff the mesh is a disk (otherwise must be sphere).
%force order - if true use given cone order. if not given or false, use a
%Travelling Salesmen approximation to compute the ordering which will
%generate the shortest cut graph.
if nargin<5
forceOrder=false;
end
flattener=Flattener(V,T,inds,'isdisc',isdisc);
flattener.mesh_name='mesh';
if isdisc
flattener.disk_orbifold();
else
if ~forceOrder
flattener.orderTS();
end
flattener.flatten_orbifold(true);
end
end