In[19]:=

<<LinearAlgebra`MatrixManipulation`

In[20]:=

colorFunc[z_] := Switch[IntegerPart[3 * z], 0, CMYKColor[3 * z, 1 - 3 * z, 0, 0], 1, C ... r[2 - 3 * z, 0, 3 * z - 1, 0], 2, CMYKColor[0, 3 * z - 2, 3 - 3 * z, 0], 3, CMYKColor[0, 0, 0, 1]]

In[21]:=

H[n_, z_, k_] := (1/4) * I * BesselJ[n, k * z] - (1/4) * BesselY[n, k * z]

In[22]:=

dip[x_, y_, ny_, k_] := k * (ny . (x - y)) * (Norm[x - y]^-1) * H[1, Norm[x - y], k]

In[23]:=

T[x_, y_, nx_, ny_, k_] := (I * k/4) * Sum[nx[[i]] * ny[[j]] * ((k * ((Norm[x - y]^-1) * H[1,  ... [i, j]/Norm[x - y]) - (x[[i]] - y[[i]]) * (x[[j]] - y[[j]])/Norm[x - y]^3)), {i, 1, 2}, {j, 1, 2}]

In[24]:=

plnWv[x1_, x2_, kk_, th_] := E^(I * {kk * Cos[th], kk * Sin[th]} . {x1, x2})

In[25]:=

r[t_] := 10/Sqrt[25 * (Cos[t]^2) + 4 * Sin[t]^2]

In[26]:=

bp[t_] := N[{r[t] * Cos[t], r[t] * Sin[t]}]

In[27]:=

nv[t_] := {{0, 1}, {-1, 0}} . bp '[t]/Norm[bp '[t]]

In[28]:=

k[t_] := (nv[t] . bp''[t])/Norm[bp '[t]]^2

In[29]:=

bc[t_, kk_, th_] := -plnWv[bp[t][[1]], bp[t][[2]], kk, th]

In[30]:=

delS[t_] := Norm[bp '[t]]

In[31]:=

SS[k_, NN_] := Table[If[i≠j, W[[j]] * H[0, Norm[BP[[i]] - BP[[j]]], k], 0], {i, 1, NN}, {j, 1, NN}]

In[32]:=

DD[k_, NN_] := Table[If[i≠j, W[[j]] * dip[BP[[i]], BP[[j]], NV[[j]], k], 0], {i, 1, NN}, {j, 1, NN}]

In[33]:=

TT[k_, NN_] := Table[If[i≠j, W[[j]] * T[BP[[i]], BP[[j]], NV[[i]], NV[[j]], k], 0], {i, 1, NN}, {j, 1, NN}]

In[34]:=

doExp[NN_] := Block[{}, th = 0 ; k1 = 1 ; k2 = 1 ;  ... x, y}] ≤r[ArcTan[x, y]], Re[intSol[x, y]], Re[plnWv[x, y, k2, th] + extSol[x, y]]] ]

doExp[200] ;

In[44]:=

Timing[data = Table[totSOL[x + 10^-14, 0], {x, -3, 3, .05}] ;]

Out[44]=

RowBox[{{, RowBox[{RowBox[{9.407,  , Second}], ,, Null}], }}]

In[45]:=

RowBox[{ListPlot, [, RowBox[{data, ,, RowBox[{PlotRange, , RowBox[{{, RowBox[{RowBox[{-, 1.2}], ,, 1.2}], }}]}]}], ]}]

[Graphics:HTMLFiles/index_21.gif]

Out[45]=

⁃Graphics⁃

In[46]:=

Plot[totSOL[x, 0], {x, -3, 3}]

[Graphics:HTMLFiles/index_24.gif]

Out[46]=

⁃Graphics⁃


Created by Mathematica  (March 15, 2006)