-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_bounded.m
More file actions
91 lines (89 loc) · 2.89 KB
/
Copy pathexample_bounded.m
File metadata and controls
91 lines (89 loc) · 2.89 KB
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
% Copyright Mohamed Nasser 2017
% Please cite this MATLAB functions as:
%
% When citing this software please mention the URL of the master repository
% (https://github.com/mmsnasser/CircularMap), and the paper
% M.M.S. Nasser,Fast Computation of the Circular Map, Computational Methods
% and Function Theory, 15 (2015) 187-223.
%
%
% PLEASE note that this toolbox contains the files:
% zfmm2dpart.m
% fmm2d_r2012a.mexw32
% fmm2d_r2012a.mexw64
% pthreadGC2-w32.dll
% pthreadGC2-w64.dll
% From the Toolbox:
% L. G REENGARD AND Z. G IMBUTAS , FMMLIB2D: A MATLAB toolbox for
% fast multipole method in two dimensions, Version 1.2, 2012.
% http://www.cims.nyu.edu/cmcl/fmm2dlib/fmm2dlib.html
% PLEASE also cite the FMMLIB2D toolbox.
clear
clc
%%
n = 2^10
ratio = 0.2;
t = (0:2*pi/n:2*pi-2*pi/n).';
%%
Mat_coef = [0 0 0
0.5 0.8 0.2
0.5+0.4i 0.3 0.5
0.2+0.75i 0.6 0.2
0.1+0.55i 0.4 0.1
-0.2+0.35i 0.2 0.5
-0.55+0.5i 0.4 0.3
-0.80 0.2 0.7
-0.4-0.05i 0.5 0.2
-0.35-0.35i 0.7 0.3
+0.1-0.35i 0.1 0.5
0.00-0.8i 0.7 0.2
0.55-0.4i 0.6 0.2
];
cent = Mat_coef(:,1);
radx = Mat_coef(:,2);
rady = Mat_coef(:,3);
m = length(cent)-1
%%
alphain = 0;
et(1:n,1) = exp(i.*t);
etp(1:n,1) = i.*exp(i.*t);
for k=2:m+1
et(1+(k-1)*n:k*n,1) = cent(k)+0.5.*(+radx(k).*cos(t)-i*rady(k).*sin(t));
etp(1+(k-1)*n:k*n,1) = 0.5.*(-radx(k).*sin(t)-i*rady(k).*cos(t));
end
%%
figure;
hold on
box on
k=1;
c_cr = et((k-1)*n+1:k*n,1); c_cr(n+1) = c_cr(1);
plot(real(c_cr),imag(c_cr),'k','LineWidth',2.5)
for k=2:m+1
c_cr = et((k-1)*n+1:k*n,1); c_cr(n+1) = c_cr(1);
plot(real(c_cr),imag(c_cr),'b','LineWidth',2.5)
end
c_cr = cent(2:end);
plot(real(alphain),imag(alphain),'or','LineWidth',2.5)
% plot(real(c_cr),imag(c_cr),'ok','LineWidth',1.0,'MarkerFaceColor','k')
axis equal
axis([-1.05 1.05 -1.05 1.05])
%%
%%
[zet,zetp,cntd,rad]=circmap(et,etp,alphain,n);
%%
figure;
hold on
box on
k=1;
c_cr = zet((k-1)*n+1:k*n,1); c_cr(n+1) = c_cr(1);
plot(real(c_cr),imag(c_cr),'k','LineWidth',2.5)
for k=2:m+1
c_cr = zet((k-1)*n+1:k*n,1); c_cr(n+1) = c_cr(1);
plot(real(c_cr),imag(c_cr),'b','LineWidth',2.5)
end
c_cr = cntd(2:end);
plot(real(cntd(1)),imag(cntd(1)),'or','LineWidth',2.5)
% plot(real(c_cr),imag(c_cr),'ok','LineWidth',1.0,'MarkerFaceColor','k')
axis equal
axis([-1.05 1.05 -1.05 1.05])
%%