-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.m
87 lines (78 loc) · 2.25 KB
/
model.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
%Records the details of change to surface, for better merge.
%Random Patches is used to find planes, fix the seed for reproducible
%results. Random seed for RandPerm:
global SEED estimated_size model;
SEED = 420;
%Estimated size of the model
% Use getRotatedPoints function with plot to find this.
% %Dimension of the X Z Y edge of the box
estimated_size = [0.17 0.09 0.17];
%Use the below one for testing
%estimated_size = [0.9 0.7 0.5];
%Red is main plane, blue is the second (clockwise second if third
%plane exists) (It may show up as green).
%Use playPlane2D to estimate this.
%below is a matrix showing:
% first column: Change to red plane
% 0: not changed
% 1: changed to top,
% 2: changed to right,
% 3: changed to bottom,
% 4: changed to left,
% 12/14/32/34: Multiple Changes
% second colum: direction of the "blue" plane.
% 0: one or less plane is shown,
% 1: on top,
% 2: on right,
% 3: on bottom,
% 4: on left,
model = [0 0; ... % 1
0 0; ... %
0 0; ... %
0 1; ... %
0 1; ... % 5
0 1; ... %
1 0; ... %
0 0; ... %
1 3; ... %
0 0; ... % 10
0 1; ... %
0 1; ... %
12 4; ... %
4 0; ... %
1 3; ... % 15
0 2; ... %
0 1; ... %
0 2; ... %
2 4; ... %
0 2; ... % 20
2 4; ... %
0 4; ... %
0 0; ... %
0 2; ... %
2 0; ... % 25
0 2; ... %
2 4; ... %
0 4; ... %
0 0; ... %
0 2; ... % 30
2 4; ... %
0 0; ... %
1 3; ... %
0 3; ... %
0 2; ... % 35
0 1; ... %
1 0; ... %
0 0; ... %
0 1; ... %
1 3; ... % 40
0 0; ... %
0 1; ... %
0 1; ... %
1 2; ... %
0 0; ... % 45
2 4; ... %
0 4; ... %
0 0; ... %
0 1; ... %
0 0]; % 50