95 Reputation

3 Badges

5 years, 130 days

MaplePrimes Activity

These are questions asked by Guy1

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 49-grid 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.





Fig. 3: Higher grid for Lambert projection showing wrong grids.


Here, my parametric equations:

- The sphere equation is

S := (θ,φ)-> R * er(θ,φ)


The unit radial vector (US coordinates system) is:

er := (θ,φ)-> 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



- The projection on plane (Lambert projection) is

P := (θ,φ)-> X0 + R*α(θ,φ)*eρ(θ,φ):


X0 := 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 X0 and any point on the sphere.


eρ := (θ,φ)-> eN(θ,φ) &x er0:            Crossproduct

eρ is the polar direction from fixed point X0 to any point X = S(θ,φ)  on the sphere


eN := (θ,φ)-> if          evalf(abs(φ - φ0) - π) = 0 then

eθ0   #Arbitrary elevation unit vector, but unimportant now.

else      UNITVECTOR(er0 &x er(θ,φ))




- 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 X0

er0 := er0, φ0



Note that implicitplot3d-based 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 Equal-Area (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 500-pixel image for test and large 1000-pixel 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





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.






Here the full PDF report:





Hi MaplePrimes team,


If I assume a plot-based function or procedure C(s,t) and P1(t) are hidden in a package somewhere I don’t care about the type of geometry (spacecurve or plot3d). Now, I just want to animate P1(t) following the variable t. How do I do?

Example 1: Curve Animation in variable t

1. Equation

C := (s,t)-> Vector([cos(s), sin(s), t*s/2]):     #Helix shape as example


2. Plot

P1 := t-> display(spacecurve(C(s,t), s = 0..3*2*Pi, linestyle = solid)):



Example 2: Surface Animation in variable t

1. Equation

S := (x,y,t)-> Vector([x, y, t/(1 + x^2 + y^2)]):

2. Plot

P2 := t-> display(plot3d(S(x,y,t), x = -2..2, y = -2..2)):


If I assume the function or procedure S(x,y,t) and P2(t) are hidden in a package somewhere I don’t care. Now, I just want to animate P2(t) following the variable t. How do I do?



Example 3: Mixing Curve and Surface Animation in variable t

The ideal/”dream” basic syntax would be:

animate(display, [P1(t), P2(t)], t = t1..t2)

But it does not work.




Dear MaplePrimes team,


For display a beautiful parametric surface with hole (or pierced surface), unfortunately unlike CAD (computer-aided design) tool, Maple requires a large grid number. Therefore the computing is too long and requires huge RAM only with grid of [500,500] on a modern computer.


Fig. 1: For a complex surface such an aircraft fuselage here, Needs high grid, therefore, the compilation is too long with modern computer (Intel Core i7, 2.4 GHz CPU, 16 GB RAM). If displays supplementary windows holes on fuselage, the software may bug when the RAM is full.


Question 1:

In matter of low cost computation, do you have better solution to create a fast surface with smooth hole from given a parametric surface equation S(x,y) and given any convex/concave-closed parametric curve C(t) that is projected on surface S(x,y)?

Fig. 2: These surfaces are been created in Maple 2016 from given initial parametric surface equation and curve projected on the surface. But requires huge grid, huge RAM, and long time to get smooth hole when free CAD tools are fast and low RAM.


Question 2:

Because I noted that the Maple’s view option renderers smooth edges of any surface. My question is: Is it possible to use the internal structure of display/view used by Maple to apply at free boundaries? I think it will be possible to create many class of view, for examples: cylindrical sector, spherical sector views or more rather to be limited with conventional cubic view. And thus, I think it will be possible to create own smooth hole or multiple-hole on surface and get smooth pierced surface.


I know that almost of technicians/engineers will recommend me to use a CAD tool to create surface with hole. But the objective here is to keep purely a mathematical mind and work with exact equations (analytic equations).

On a free CAD tool, even the complex holes are created very fast only with low RAM. Why not on Maple?





This message is for those who prefer use Maple in 1-D Math Input.

In 1-D Math Input, in previous versions of Maple, it was very comfortable to have the freedom to write ONE large statement in Continuing ON SEVERAL LINES for clarity and better reading from a *.wm file.

Here are simple examples, but in reality, I work on very complex cases.


Example #1:

A := u*( x + ln(x +1) + cos(x))

     + v*(1 + sqrt(x))

     + w*(sin(x) + tan(x) + x);


Example #2:


          , cos(s)*sin(t)

          , sin(s)]);


Example #3:


  plot(f(x), x = x1..x2)

, plot(g(x), x = x1..x2)

, plot(h(x), x = x1..x2)



In Maple 2015 with a *.wm file, when you try to execute these example in 1-D Math Input, an error is returned and unfortunately forces you to write everything on the same line, what makes reading tiring.


Is a bug or a voluntary deactivation?

Can you help me, please?



Page 1 of 1