-
Notifications
You must be signed in to change notification settings - Fork 3
/
instance_colormap.m
48 lines (45 loc) · 1.24 KB
/
instance_colormap.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
function colormap = instance_colormap()
if(exist('instance_colormap.mat', 'file'))
load('instance_colormap.mat')
else
colormap2 = [];
step = 0.1;
for i=0.1:step:0.9
for j=0.1:step:0.9
for k=0.1:step:0.9
colormap2 = [colormap2; [i j k]];
end
end
end
colormap2 = colormap2(2:end-1,:);
idx = randperm(size(colormap2,1));
colormap2 = colormap2(idx,:);
% colormap1 = [];
% step = 1;
% for i=0:step:1
% for j=0:step:1
% for k=0:step:1
% colormap1 = [colormap1; [i j k]];
% end
% end
% end
% colormap1 = colormap1(2:end-1,:);
% idx = randperm(size(colormap1,1));
% colormap1 = colormap1(idx,:);
colormap1 = [...
1 1 0
1 0 0
0 0 1
0 0.5 0
1 0 1
0.5 0 0
0.5 0 0.5
0 0.5 0.5
0 0.7 0.7
0 1 0
0 0 0.6
0.5 0.5 0];
colormap = [[0 0 0]; colormap1; colormap2];
save('instance_colormap.mat', 'colormap');
end
end