-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotFlowLines.m
165 lines (136 loc) · 3.37 KB
/
PlotFlowLines.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
% Plots and saves Flow Lines in Phase Space for
% various diffeomorphisms
%
% AUTHOR: D Lantzberg, Nov. 2017
boxArea = 1/4;
xl = -16;
xr = 16;
yu = -8;
yo = 8;
FlowLinesY = xl : sqrt(boxArea) : xr ;
FlowLinesX = yu : sqrt(boxArea) : yo ;
y = (yu : .01 : yo);
x = (xl : .01 : xr);
%% SIN / COS Symplecto
figure(1);
sigCos = @(x) 2*x + sin(x);
dSigCos = @(x) (2 + cos(x));
contour(X,Y,X./dSigCos(Y),FlowLinesY,'r','LineWidth',1.5);
hold on;
plot( x , ones(size(x(:)))*FlowLinesX(:)' ,'k', 'LineWidth' , 1.5 );
hold off;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
box on;
axis([xl/2 xr/2 yu yo]); grid;
ax = gca;
ax.XTick = -8 : 8;
ax.YTick = -8 : 8;
xtl = ax.XTickLabel;
xtl(9) = {'Q'};
ytl = ax.YTickLabel;
ytl(9) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
plotaxis(0,'k',4);
axis square;
zoom(2);
axis square;
pause;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
%% LOG2 Symplecto (Wavelet tesselation)
figure(2);
sigLog = @(x) log2(abs(x));
iSigLog = @(x) 2.^(x);
dSigLog = @(x) 1./log(2) ./ ( abs(x) );
contour(X,Y,X./dSigLog(Y),FlowLinesY,'r','LineWidth',1.5);
hold on;
plot( x , ones(size(x(:)))*FlowLinesX(:)' ,'k', 'LineWidth' , 1.5 );
hold off;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
box on;
axis([xl/2 xr/2 yu yo]); grid;
ax = gca;
ax.XTick = -8 : 8;
ax.YTick = -8 : 8;
xtl = ax.XTickLabel;
xtl(9) = {'Q'};
ytl = ax.YTickLabel;
ytl(9) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
plotaxis(0,'k',4);
axis square;
zoom(2);
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
%% IDENTICAL Symplecto (STFT tesselation)
figure(3);
sigId = @(x) x;
dSigId = @(x) ones(size(x));
contour(X,Y,X./dSigId(Y),FlowLinesY,'r','LineWidth',1.5);
hold on;
plot( x , ones(size(x(:)))*FlowLinesX(:)' ,'k', 'LineWidth' , 1.5 );
hold off;
box on;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
axis([xl/2 xr/2 yu yo]); grid;
ax.XTick = ax.YTick;
ax = gca;
ax.XTick = -8 : 8;
ax.YTick = -8 : 8;
xtl = ax.XTickLabel;
xtl(9) = {'Q'};
ytl = ax.YTickLabel;
ytl(9) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
%ax.XTick = FlowLinesY;
%ax.YTick = FlowLinesX;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
plotaxis(0,'k',4);
axis square;
zoom(2);
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
%% SIN / COS Symplecto
figure(4);
sigSin = @(x) 1.25*x + cos(x);
%iSigCos = @(x)??;
dSigSin = @(x) (1.25 - sin(x));
contour(X,Y,X./dSigSin(Y),FlowLinesY,'r','LineWidth',1.5);
hold on;
plot( x , ones(size(x(:)))*FlowLinesX(:)' ,'k', 'LineWidth' , 1.5 );
hold off;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
box on;
axis([xl/2 xr/2 yu yo]); grid;
ax = gca;
ax.XTick = -8 : 8;
ax.YTick = -8 : 8;
xtl = ax.XTickLabel;
xtl(9) = {'Q'};
ytl = ax.YTickLabel;
ytl(9) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
set(gca,'FontSize',24);
set(gca,'FontName','CMU Serif');
plotaxis(0,'k',4);
axis square;
zoom(2);
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
pause;
SaveAsEps(1,'FlowLinesPSinCos');
SaveAsEps(2,'FlowLinesPD');
SaveAsEps(3,'FlowLinesPQ');
SaveAsEps(4,'FlowLinesPSinCosWide');