-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript_orbifold_sphere.m
50 lines (44 loc) · 1.37 KB
/
script_orbifold_sphere.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%==========================================================================
% Example script for computing embeddings of sphere-topology meshes into
% sphere-topology spherical orbifolds.
%==========================================================================
%% init and load some data
init;
load my_man_maxp.mat
%% embedding the mesh into the orbifold
% each orbifold type according to Fig. 2 in the paper, left 5
% examples (sphere-topology), choose a different orbifold_type to see
% embeddings into the different orbifolds.
orbifold_type=4;
switch orbifold_type
case 1
cones=[2 3 4];
case 2
cones=[2 3 3];
case 3
cones=[2 3 5];
case 4
k=4; % this can be any integer >1
cones=[k 2 2];
case 5
inds=inds([1 3]); %this orbifold only has two cones so taking two selected vertices
k=5; % this can be any integer >1
otherwise
error('orbifold type should be 1<=int<=5');
end
e=embed_from_data(V,T,cones,inds);
%% Drawing stuff
figure(1);
clf;
% draw the tiling of the embedding on the sphere
subplot(1,2,2);
e.draw('tileboundary',true,'tilepale',0.8);
ax=gca;
ax.CameraViewAngle=8.3;
campos([ -2.7762 8.5443 5.3982]);
camup([ 0.1592 -0.4898 0.8572]);
% draw the source mesh with cuts
subplot(1,2,1);
e.draw('coords','source','colormap','bronze');
ax=gca;
ax.CameraViewAngle = 5.2845;