-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisualizeVerticesLevel.m
executable file
·51 lines (35 loc) · 1.14 KB
/
visualizeVerticesLevel.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
51
function visualizeVerticesLevel(level)
clc;
res = 2^level;
% [X, Y, Z] = readClonClatVertices();
% pentagons = importdata('icosahedron/indexOfThePentagonTriangle.mat');
%
% for i = 1:size(pentagons,2)
%
% patch(X(:,pentagons(:,i)), Y(:,pentagons(:,i)), Z(:,pentagons(:,i)), 'EdgeAlpha',0);
% hold on;
%
% end
%
% hp = findobj(gcf,'type','patch');
% set(hp,'facealpha',0.0)
% hold on;
diamonds = importdata('icosahedron/Diamonds.mat');
for i = 1:length(diamonds)
D = diamonds{i};
patch(D(1,:), D(2,:), D(3,:), 0.5*i,'EdgeAlpha',0);
hold on;
end
% hp = findobj(gcf,'type','patch');
% set(hp,'facealpha',0.2)
hold on;
for v = 1:10
vertices = importdata(['vertices/verticesOfDiamond',num2str(v),'.mat']);
for m = 1:res:size(vertices,1)
for n = 1:res:size(vertices,2)
plot3(vertices{m,n}(1),vertices{m,n}(2),vertices{m,n}(3),'.k');
hold on;
end
end
end
end