-
Notifications
You must be signed in to change notification settings - Fork 0
/
investigate3D.m
43 lines (40 loc) · 1011 Bytes
/
investigate3D.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
disp(SCATTER_PATH);
hold on;
resolution = 6;
for p = 1:resolution
for q = 1:resolution
for r = 1:resolution
loadDice();
pqr2xyz();
initDiceFromXYZ();
roll();
scatter3(x, y, z, 8, FACE_COLOR(roll_result, :), 'filled');
end
pause(.001);
end
end
pause(1);
while true
disp('Saving fig...');
savefig(sprintf(SCATTER_PATH, resolution));
disp('fig saved.');
resolution = resolution * 2 - 1;
if resolution > 22
break;
end
for p = 1:resolution
for q = 1:resolution
for r = 1:resolution
if mod(p, 2) == 1 && mod(q, 2) == 1 && mod(r, 2) == 1
continue;
end
loadDice();
pqr2xyz();
initDiceFromXYZ();
roll();
scatter3(x, y, z, 8, FACE_COLOR(roll_result, :), 'filled');
pause(.001);
end
end
end
end