20
20
# [documentation](https://MikaelSlevinsky.github.io/FastTransforms).
21
21
22
22
using FastTransforms, LinearAlgebra, Plots
23
+ plotlyjs ()
23
24
24
25
# Our function $f$ on the disk:
25
26
f = (x,y) -> (x^ 2 - y^ 2 + 1 )/ ((x^ 2 - y^ 2 + 1 )^ 2 + (2 x* y+ 1 )^ 2 )
@@ -37,20 +38,12 @@ r = [sinpi((N-n-0.5)/(2N)) for n in 0:N-1]
37
38
# On the mapped tensor product grid, our function samples are:
38
39
F = [f (r* cospi (θ), r* sinpi (θ)) for r in r, θ in θ]
39
40
40
- # We superpose the grid on top of a contour plot of $f$:
41
+ # We superpose a surface plot of $f$ on top of the grid :
41
42
X = [r* cospi (θ) for r in r, θ in θ]
42
43
Y = [r* sinpi (θ) for r in r, θ in θ]
43
-
44
- # PlotlyJS
45
- plotlyjs ()
46
- scatter3d (vec (X), vec (Y), vec (0 X); markersize= 0.5 , markercolor= :red , size= (600 , 600 ))
44
+ scatter3d (vec (X), vec (Y), vec (0 X); markercolor= :red , size= (1000 , 1000 ))
47
45
surface! (X, Y, F; legend= false , xlabel= " x" , ylabel= " y" )
48
46
49
- # GR
50
- gr ()
51
- scatter3d (vec (X), vec (Y), vec (0 X); markersize= 0.5 , markercolor= :red , size= (600 , 600 ))
52
- surface! (vec (X), vec (Y), vec (F); legend= false , xlabel= " x" , ylabel= " y" )
53
-
54
47
# We precompute a (generalized) Zernike--Chebyshev×Fourier plan:
55
48
α, β = 0 , 0
56
49
P = plan_disk2cxf (F, α, β)
@@ -99,20 +92,12 @@ z = [sinpi((M-2m-1)/(2M)) for m in 0:M-1]
99
92
# On the mapped tensor product grid, our function samples are:
100
93
F = [f (x[n], w[n]* z) for n in 1 : N, z in z]
101
94
102
- # We superpose the grid on top of a contour plot of $f$:
95
+ # We superpose a surface plot of $f$ on top of the grid :
103
96
X = [x for x in x, z in z]
104
97
Y = [w* z for w in w, z in z]
105
-
106
- # PlotlyJS
107
- plotlyjs ()
108
- scatter3d (vec (X), vec (Y), vec (0 X); markersize= 0.5 , markercolor= :green , size= (600 , 600 ))
98
+ scatter3d (vec (X), vec (Y), vec (0 X); markercolor= :red , size= (1000 , 1000 ))
109
99
surface! (X, Y, F; legend= false , xlabel= " x" , ylabel= " y" )
110
100
111
- # GR
112
- gr ()
113
- scatter3d (vec (X), vec (Y), vec (0 X); markersize= 0.5 , markercolor= :green , size= (600 , 600 ))
114
- surface! (vec (X), vec (Y), vec (F); legend= false , xlabel= " x" , ylabel= " y" )
115
-
116
101
# We precompute a Dunkl-Xu--Chebyshev plan:
117
102
P = plan_rectdisk2cheb (F, β)
118
103
0 commit comments