7 years, 61 days

## How Do I Fill a Concave 3d Parametric Pl...

Maple 2021

Hi MaplePrimes team,

Is there a generalized way to fill an extremely CONCAVE closed 3d parametric plane curve in Maple with spacecurve command (NO implicitplot3d), preferably without doing any multi-decomposition or creating a particular skeleton, or algorithm/programming?

Here my example: #Circle of reference
R0 := 1:
C0 := t-> < cos(t), sin(t), 0 >:

R := t-> R0*(1 + 1/2*sin(t)):

#Variable phase
Dt := t-> Pi/2*sin(2*t):

#CONCAVE Curve
C := t-> R(t)*C0(t - Dt(t)):
'C(t)' = C(t);

#Range
t1, t2 := 0, 2*Pi:

#Plot
GC := spacecurve(C(t), t = t1..t2, color = "Red", thickness = 3
, linestyle = solid
, scaling = constrained, axes = frame, orientation = [50,40,0]):
GC;

We know how to do it easily for any convex 3d plane curve (circle, ellipse, regular polygon, etc ...).

We also know how to do it for 2d curve with the Maple’s plot option filled = true but obviously not in 3d.

Best.

Guy.

## Step Detection for Step Functions...

Maple

Hi MaplePrimes team,

Does Maple have a step detection command for a given step function f(x)?

The command has to return a list of jump detections in a given range [xmin... xmax].

For example, can Maple find the following jump detections: Figure 1 (trivial case): f(x) = floor(x)

where it is easy to guess the list of step detections: [x1 = 1, x2 = 2, x3 = 3, …, xn = n] Figure 2: g(x) = 2 + floor(x + 5*sin x)

a little more difficult.

Guy.

## Why Wouldn't a Trimmed Surface with plot...

Maple

Hi MaplePrimes team,

I am aware that Maple is not designed for CAD and I am not here for you to help me build any advanced system like the example below. Figure 1: Trimmed surface of fuselage to create airplane windows.

Here I my problem. Even using the adaptmesh option, creating serious trimmed surfaces requires large numbers of grids like for example [3000, 3000] and even beyond, which makes a mesh unnecessary on most of the surface and especially where we don’t need high resolution.

While if we limit the display volume with the Maple’s view command (view = [x1..x2, y1..y2, z1..z2]), the edges are always smooth regardless of the coordinates system or the type of mesh of the surface to be treated.

And so, the reason I’m writing this message is to ask you why creating trimmed surface with plot3d surface wouldn’t use Maple view’s algorithm to get smooth edges?

Future Alternative Solution:

I also take this opportunity to ask you when would it be possible to update the Maple’s grid option such that the point space will variable in term of surface variable. For example:

plot3d(<x(s,t), y(s,t), z(s,t)>, s = s1..s2, t = t1..t2, grid = [m(s,t), n(s,t)] )

I am sure that this solution, which for me does not seem to be difficult to implement, could be an alternative to enrich the mesh where we really need it and therefore a better control. What do you think?

Best.

Guy.

## How to Plot a Colored Surface Under plot...

Maple 2020

Hi MaplePrimes team,

I want to create two 3d surfaces with plot3d command in Maple, one of which represents a light-emitting diode (LED).

For that, my idea is simple: Just to disable the shade on a specific surface (representing the LED-like) among other surface. So, whatever the direction of the light, the LED surface keeps a constant luminosity.

Unfortunately, the glossiness = 0 option is still dependent of light direction.

I looked at all the options for plot3d and display commands, but I couldn't find anything for disable light on special surface.

Maybe in PLOT3D command?

If not, is there an option to add a second light source?

Simple example I would like create:

- 1. A surface with regular light:

BALL := plot3d(<cos(t)*cos(s), cos(t)*sin(s), sin(t)>, s = 0..2*Pi, t =-Pi/2..Pi/2, color = "Blue"):

- 2. An illuminated surface representing the LED:

LED := plot3d((<2 + cos(t)*cos(s), cos(t)*sin(s), sin(t)>, s = 0..2*Pi, t =-Pi/2..Pi/2, color = "Yellow", What option to insert?):

Then, the assembly will give:

display(BALL, LED);

My Advanced Applications Tests in Maple Figure 1: Aisle LED light and LED-screens of first-class seats in an illuminated cabin on board of an aircraft. Figure 2: Here is the problem in the darkness. The aisle LED light and LED-screen must be stay constantly illuminated for any direction of light.

To better understand my objectives, here is another image using lights. Note that the LEDs (pale yellow strip shapes) stay constantly illuminated whatever the daylight and therefore allowing the aircraft to be visible. Figure 3: Exterior lighting systems and dazzling jet engine afterburner of a military transport aircraft concept.

Best.

Guy.

## Problem of grid option in plot3d...

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.  300-grid 1000-grid

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

Here, my parametric equations:

- The sphere equation is

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

Where,

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

Then,

- The projection on plane (Lambert projection) is

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

Where

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

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 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 (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 φ, λ.

Best.

Guy.

Here the full PDF report:

Problem_of_grid_option_in_plot3d_-_by_Guy_April_27th_2020.pdf

 1 2 Page 1 of 2
﻿