Hi MaplePrimes team,
I am struggling to display a correct projection of a sphere on a tangent plane disc of with Maple’s plot3d, but the resulting grid is not correct somewhere despite of the increasing of number of grids. See picture below:
Fig. 1: The sphere projection on a tangent plane shows a grid problem.
How can I do to fix the problem of undesired grid when the mathematical equation is correct?
Fig. 2: Default 49grid for Lambert projection showing wrong grids.
To increase the number of grids such that grid = [1000, 1000], grid = [2000, 2000] or higher, or the idea of removing just one row grid row or one column grid like [299, 299] changes absolutely nothing. It still results some crossing meshes that hide desired projected map.
Even the use of the option numpoints fails.


300grid

1000grid

Fig. 3: Higher grid for Lambert projection showing wrong grids.
Here, my parametric equations:
 The sphere equation is
S := (θ,φ)> R * e_{r}(θ,φ)
Where,
The unit radial vector (US coordinates system) is:
e_{r} := (θ,φ)> cos(θ) *cos(φ) * ex + cos(θ) *sin(φ) * ey + sin(θ) * ez:
ex := <1,0,0>: ey := <0,1,0>: ez := <0,0,1>:
 θ: latitude or elevation variable;
 φ: longitude or azimuthal variable
 R is the radius
Then,
 The projection on plane (Lambert projection) is
P := (θ,φ)> X_{0} + R*α(θ,φ)*e_{ρ}(θ,φ):
Where
X_{0} := S(θ_{0}, φ_{0}) Free tangent point belonging both to the sphere and the plane disc.
α := (θ,φ)> arccos( cos(φ  φ_{0})*cos(θ)*cos(θ_{0}) + sin(θ)*sin(θ_{0}) ):
α is the arc angle of radius R between X_{0} and any point on the sphere.
e_{ρ} := (θ,φ)> e_{N}(θ,φ) &x e_{r0}: Crossproduct
e_{ρ} is the polar direction from fixed point X_{0} to any point X = S(θ,φ) on the sphere
e_{N} := (θ,φ)> if evalf(abs(φ  φ_{0})  π) = 0 then
e_{θ0} #Arbitrary elevation unit vector, but unimportant now.
else UNITVECTOR(e_{r0} &x e_{r}(θ,φ))
fi:
Where,
 The unit tangential elevation vector
e_{θ0} :=sin(θ_{0})*cos(φ_{0}) * ex  sin(θ_{0})*sin(φ_{0}) * ey + cos(θ_{0}) * ez:
 The unit radial vector at X_{0}
e_{r0} := e_{r}(θ_{0}, φ_{0})
Note that implicitplot3dbased method is not really preferred here because it is very high cost in grids unlike the parametric equation method which responds in few seconds at high grid number ~2000 with modern computer.
My Goal:
My final objective is to plot a world map projection of the Earth called Lambert Azimuthal EqualArea (abbreviated LAEA) projection following any geographic coordinates involving the latitude = φ and the longitude = λ, all input angle can be in degree angle, but internally compiled in radian.
For that, I insert an initial equirectangular projection of world map in the Maple’s plot3d option.
Fig. 4: Initial equirectangular projection of world map (low 500pixel image for test and large 1000pixel or higher resolution for definitive image).
The astute now is to arrange the ranges such that the surface equation is defined on
ϕ = π/2...π/2 and λ = 0..2π
And taking account the image scanning (Width x Height) have to be swept however in the range:
λ = 0..2π then ϕ = 0..π,
Then, I get this instruction without to detail all options:
plot3d(S(ϕ  Pi/2, g(λ  Pi)), λ = 0..2*Pi, ϕ = 0..Pi, image = “C:\....\World_map.jpg”, …)
where g is a longitudinal λperiodic function on 0..2π in the objective to keep the continuity of the map at any longitude.
Here, the first result of LAEA projection at φ = 0 and λ = 0
(a)


(b)

(c)

Fig. 5: LAEA projection near latitude = 0 and longitude = 0 shows negligible grid failure at circular edge.
So now, the problem begins worse when input begins far from (0°,0°), for instance (60°, 90°).
In fact, the overall resulting map seems to be correct, but it is unfortunately hidden by an unnecessary secondary grid layer trending an undesirable shortcut grid lines explained at the beginning of this report.
Fig. 6: Wrong grids seem to be the source of mask problem for LAEA projection at any φ, λ.
Thank you for your time.
Best.
Guy.
Here the full PDF report:
Problem_of_grid_option_in_plot3d__by_Guy_April_27th_2020.pdf