-
Notifications
You must be signed in to change notification settings - Fork 2
/
makeLink5.m
50 lines (46 loc) · 960 Bytes
/
makeLink5.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 p = makeLink5(parentAxes, faceColor)
if (nargin == 0)
parentAxes = gca;
faceColor = [.7 .7 .7];
elseif (nargin == 1)
faceColor = [.7 .7 .7];
end
set(parentAxes, 'DataAspectRatio', [1 1 1]);
link5Verts = [-0.25 -0.5 -5.12
-0.25 0.5 -5.12
0.25 0.5 -5.12
0.25 -0.5 -5.12
-0.25 -1.2 -3.37
-0.25 1.2 -3.37
0.25 1.2 -3.37
0.25 -1.2 -3.37
-0.25 -0.35 0
-0.25 0.35 0
0.25 0.35 0
0.25 -0.35 0
-0.6 -0.64 -4.37
-0.6 0.5 -4.37
-2 0.5 -4.37
-2 -0.64 -4.37
-0.6 -0.64 -3.87
-0.6 0.5 -3.87
-2 0.5 -3.87
-2 -0.64 -3.87];
link5Faces = [1 2 3 4;
1 2 6 5;
2 3 7 6;
3 4 8 7;
4 1 5 8;
5 6 10 9;
6 7 11 10;
7 8 12 11;
8 5 9 12;
9 10 11 12;
13 14 15 16;
13 14 18 17;
14 15 19 18;
15 16 20 19;
16 13 17 20;
17 18 19 19];
p = patch('Parent', parentAxes, 'Faces',link5Faces,'Vertices',link5Verts,'FaceColor',faceColor);
end