# MaplePrimes Commons General Technical Discussions

The primary forum for technical discussions.

Create a new Post in this category

### MRB constant N part 3

May 21 2012 Maple
0 4

Below we have approximations involving the MRB constant. The MRB constant plus a fraction is saved as P while a combination of another constant is saved as Q. We then subtract Q from P and always have a very small result!

### Domain problems in plot for Maple 16

May 03 2012 Maple 16
4 14

The basic plot routine in Maple 16 has a serious problem with the domain.  The following is an example.

The domain is correct in Maple 15.  This failure occurs in both Windows 7 and Linux.

### PS driver in Maple 16 for Windows

May 02 2012 Maple 16
3 7

I have been generating graphics in Maple 16 using the plotsetup(ps,...) command under Windows 7 and Linux.  Maple tech support has a fix for Linux and has confirmed that there is a bug in the Windows version.  These are a Windows eps (converted to png for uploading) and png of the same figure.  The eps conversion should not do this.

### MRB Constant Y

April 28 2012 Maple
0 3

### Location marker for Plot Component

April 26 2012 Maple
4 0

The Locator object is a nice piece of Mathematica's Manipulate command's functionality. Perhaps Maple's Explore command could do something as good.

Here below is a roughly laid out example, as a Worksheet. Of course, this is not...

### MRB Constant X

April 21 2012 Maple
0 4

The MRB constant is evaluated by

### MRB Constant W

April 14 2012
0 1

 (1)

What are the quotients  ot the  continued fration of the sum of

Here are the  quotients  of some partial sums.

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

Here are the quotients of the  continued fration  of the sum.

 (15)

With the exception of the leading 0, that is close to the integer squence of pi.

 (16)

The exponents of 2 that sum the numerator and denominator, in the following way, of that multiple of pi give rise to the integer sequences {0,1,2,3,8,16},numbers such that floor[a(n)^2 / 7] is a square, and {0,2,3,4,8,16},{0,3} union powers of 2.

 (17)

We can do the same thing for the first 20 quotients giving rise to the integer sequences {0,1,2,5,6,8,10,13,17,19,22,23,24,28,31} and {0,4,6,9,12, 14,15,16,18,22, 23,24,28,31}. What can be said of these sequences?

 (18)

 (19)

 (20)

### Extension of getdata

April 03 2012 Maple
2 4

Starting from Maple 15, the useful ?plottools/getdata command is added. It tansforms a Maple plot to a Matrix. Unfortunately, the getdata command deals only with Maple plots. The question arises: "How to get a data from bmp, jpg, tiff, pcx, gif, png and wmf formats?" This is used in medicine and engineering. Such question was asked here

### MRB Constant V

March 23 2012 Maple
0 2

But what can we say about

Maple does not evaluate it:

 product: Cannot show that (-1)^n*(n^(1/n)-1) has no zeros on [2,infinity] (1)

And perhaps it should not because of the alternating sign;

 (2)

 (3)

 (4)

### MRB constant U

March 18 2012 Maple
0 0

If you use all the convergents of the simple continued fraction of the MRB constant as the terms of a generalized continued fraction, then likewise use the new convergents in another generalized continued fraction, and so on... you arrive at 0.5557531....  For more on this process see https://oeis.org/wiki/Convergents_constant .

### One more argument for long double

February 01 2012 Maple
1 20

If there are still doubts to support "long double" in evalhf then there is one more argument to implement them in at least those machines that support it:
CalcInEvalhfFast.mw

P.S. In that well-known holy war about long double supporting in compilers i'm rather on side of "to support them" than on side of (stupid) microsoft visual c++ compiler.

### animation of 3D plot rotation

January 24 2012 Maple 15
8 6

Suppose that you wish to animate the whole view of a plot. By whole view, I mean that it includes the axes and is not just a rotation of a plotted object such as a surface.

One simple way to do this is to call plots:-animate (or plots:-display on a list of plots supplied in a list, with its `insequence=true` option). The option `orientation` would contain the parameter that governs the animation (or generates the sequence).

But that entails recreating the same plot each time. The plot data might not even change. The key thing that changes is the ORIENTATION() descriptor within each 3d plot object in the reulting data structure. So this is inefficient in two key ways, in the worst case scenario.

1) It may even compute the plot's numeric results, as many times as there are frames in the resulting animation.

2) It stores as many instances of the grid of computed numeric data as there are frames.

We'd like to do better, if possible, reducing down to a single computation of the data, and a single instance of storage of a grid of data.

To keep this understandable, I'll consider the simple case of plotting a single 3d surface. More complicated cases can be handled with revisions to the techniques.

Avoiding problem 1) can be done in more than one way. Instead of plotting an expression, a procedure could be plotted, where that procedure has `option remember` so that it automatically stores computed results an immediately returns precomputed stored result when the arguments (x and y values) have been used already.

Another way to avoid problem 1) is to generate the unrotated plot once, and then to use plottools:-rotate to generate the other grids without necessitating recomputation of the surface. But this rotates only objects in the plot, and does alter the view of the axes.

But both 1) and 2) can be solved together by simply re-using the grid of computed data from an initial plot3d call, and then constructing each frame's plot data structure component "manually". The only thing that has to change, in each, is the ORIENTATION(...) subobject.

At 300 frames, the difference in the following example (Intel i7, Windows 7 Pro 64bit, Maple 15.01) is a 10-fold speedup and a seven-fold reduction is memory allocation, for the creation of the animation structure. I'm not inlining all the plots into this post, as they all look the same.

```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

plots:-animate(plot3d,[P,x=-5..5,y=-5..5,orientation=[A,45,45],
axes=normal,labels=[x,y,z]],
A=0..360,frames=300);

time()-st,kernelopts(bytesalloc)-ba;

1.217, 25685408
```
```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
axes=normal,labels=[x,y,z]):

plots:-display([seq(PLOT3D(GRID(op([1,1..2],g),op([1,3],g)),
remove(type,[op(g)],
specfunc(anything,{GRID,ORIENTATION}))[],
ORIENTATION(A,45,45)),
A=0..360,360.0/300)],
insequence=true);

time()-st,kernelopts(bytesalloc)-ba;

0.125, 3538296
```

By creating the entire animation data structure manually, we can get a further factor of 3 improvement in speed and a further factor of 3 reduction in memory allocation.

```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
axes=normal,labels=[x,y,z]):

PLOT3D(ANIMATE(seq([GRID(op([1,1..2],g),op([1,3],g)),
remove(type,[op(g)],
specfunc(anything,{GRID,ORIENTATION}))[],
ORIENTATION(A,45,45)],
A=0..360,360.0/300)));

time()-st,kernelopts(bytesalloc)-ba;

0.046, 1179432
```

Unfortunately, control over the orientation is missing from Plot Components, otherwise such an "animation" could be programmed into a Button. That might be a nice functionality improvement, although it wouldn't be very nice unless accompanied by a way to export all a Plot Component's views to GIF (or mpeg!).

The above example produces animations each of 300 frames. Here's a 60-frame version:

### MRB constant T

January 13 2012 Maple
0 2

 Let c=MRB constant -1/2

### MRB constant S part 2

January 08 2012 Maple
0 0

 >

Define s as the following function involving a divergent series.

 >
 (1)

The upper limit point of the partial sums, of s is very slowly convergent.

 >
 (2)
 >
 (3)
 >
 (4)

Let mrb be tthe upper limit point of s as x goes to infinity.

 >
 (5)

Define f as the following function involving the divergnet series

 >
 (6)

Let c be the value for a in the neighborhood of 26 such that f(a)=mrb.

 (7)

The average of the upper and lower limit points of the partil sums of f converges much faster than the  upper limit point of the partial sums of s.

 >
 (8)
 >
 (9)
 >
 (10)