-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotContourLines.m
102 lines (84 loc) · 2.23 KB
/
PlotContourLines.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
% Plots and saves Contour Lines for various
% diffeomorphisms
%
% AUTHOR: D Lantzberg, Nov. 2017
boxArea = 1/4;
xl = -8;
xr = 8;
yu = -8;
yo = 8;
FlowLinesY = 2*xl : sqrt(boxArea) : 2*xr ;
FlowLinesX = yu : sqrt(boxArea) : yo ;
y = (yu-.05 : .05 : yo+.05);
x = (xl-.05 : .05 : xr+.05);
[X,Y] = meshgrid(x,y);
%% SIN / COS Symplecto
figure(1);
sigCos = @(x) 2*x + sin(x);
dSigCos = @(x) (2 + cos(x));
contour(X,Y,X./dSigCos(Y),FlowLinesY,'k','LineWidth',1.5);
hold on, contour(X,Y,sigCos(Y),FlowLinesX,'k','LineWidth',1.5);hold off
plotaxis(0,'k',4);
set(gca,'FontSize',16);
set(gca,'FontName','CMU Serif');
box on;
axis([xl xr yu yo]); grid;
zoom(2);
ax = gca;
xtl = ax.XTickLabel;
xtl(5) = {'Q'};
ytl = ax.YTickLabel;
ytl(5) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
%pause;
%% 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,'k','LineWidth',1.5);
hold on, contour(X,Y,sigLog(Y),FlowLinesX,'k','LineWidth',1.5);hold off
plotaxis(0,'k',4);
set(gca,'FontSize',16);
set(gca,'FontName','CMU Serif');
box on;
axis([xl xr yu yo]); grid;
zoom(2);
ax = gca;
xtl = ax.XTickLabel;
xtl(5) = {'Q'};
ytl = ax.YTickLabel;
ytl(5) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
%% SIN / COS Symplecto
figure(4);
sigCos = @(x) 1.25*x + cos(x);
dSigCos = @(x) (1.25 - sin(x));
contour(X,Y,X./dSigCos(Y),FlowLinesY,'k','LineWidth',1.5);
hold on, contour(X,Y,sigCos(Y),FlowLinesX,'k','LineWidth',1.5);hold off
plotaxis(0,'k',4);
set(gca,'FontSize',16);
set(gca,'FontName','CMU Serif');
box on;
axis([xl xr yu yo]); grid;
zoom(2);
ax = gca;
xtl = ax.XTickLabel;
xtl(5) = {'Q'};
ytl = ax.YTickLabel;
ytl(5) = {'P'};
ax.XTickLabel = xtl;
ax.YTickLabel = ytl;
axis square;
plotTickLatex2D('xlabeldy',.0,'ylabeldx',.0,'fontsize',22);
pause;
SaveAsEps(1,'SinCosCurvedTessellation');
SaveAsEps(2,'Log2CurvedTessellation');
%SaveAsEps(3,'GaborTesselation');
SaveAsEps(4,'SinCosWideCurvedTessellation');