-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotGroupTwoColorMovie.m
38 lines (32 loc) · 1.46 KB
/
plotGroupTwoColorMovie.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
function h = plotGroupTwoColorMovie(traj,group)
grNb = length(group);
trNb = length(traj);
for i = 1:trNb
plot(traj(i).points(:,1)*2,traj(i).points(:,2)*2,'w-','LineWidth',1)
end
for i = 1:grNb
k = group(i).list;
le_gr = length(k);
if le_gr > 0
% plot(traj(k(1)).points(1,1),traj(k(1)).points(1,2),'ks')
hold on
for j = 1:le_gr
% plot(traj(k(j)).points(:,1)*2,traj(k(j)).points(:,2)*2,'w-','LineWidth',2) % PLOT ALL
% Beginning TRACK
% plot(traj(k(j)).points(end,1),traj(k(j)).points(end,2),'k*')
% SEGMENT
% plot([traj(k(j)).points(1,1),traj(k(j)).points(end,1)],[traj(k(j)).points(1,2),traj(k(j)).points(end,2)],'k:')
if j < le_gr
if group(i).direction(j) == 1%INDEX?
plot([traj(k(j)).points(end,1),traj(k(j+1)).points(1,1)]*2,[traj(k(j)).points(end,2),traj(k(j+1)).points(1,2)]*2,'g-')
% Beginning GAP
% plot(traj(k(j+1)).points(1,1),traj(k(j+1)).points(1,2),'g*')
elseif group(i).direction(j) == -1%INDEX?
plot([traj(k(j)).points(end,1),traj(k(j+1)).points(1,1)]*2,[traj(k(j)).points(end,2),traj(k(j+1)).points(1,2)]*2,'r-')
% Beginning SHRINK
% plot(traj(k(j+1)).points(1,1),traj(k(j+1)).points(1,2),'r*')
end
end
end
end
end