MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • This post is continuing the theme of "animate implicitplot (a heart shape)". I tried to send a reply within this theme, but for some reason, my message is not loaded

    Sometimes it is appealing to have a package export a procedure which does not show up when calling with().

    For example, the procedure might be used elsewhere, but be otherwise so very technically obscure that nobody else would be interested. (The counter-argument is that what is good for the goose is good for the gander! If something else in Maple can make good use of it and need it, then you might too.)

    Now, Maple's modules don't have the concept of "friends",...

    To gain more visibility on the subject I've started a new thread. No solution yet and thanks Acer for trying to look into it. I almost wondered if there was a typo in the code preventing it from working properly since the code for ospd3 exists. We could almost write a loop code to check if something other than the word builtin is possible, using the try catch statement.

    I'll re-iterate the issue

    with(StringTools[PatternDictionary]):
    > bid := Create('ospd3');

    prototypes.zip

    HTML-Navigator of the tasks' prototypes  of the unified state examination in Russia 2012.
    Supplied with the links to the Maple-solutions of 2011.

    Online: http://webmath.exponenta.ru/beg/index.html

    This is one of rank tests.
    Non-parametric methods are widely used for studying populations that take on a ranked order (such as movie reviews receiving one to four stars).
    The use of non-parametric methods may be necessary when data have a ranking but no clear numerical interpretation, such as when assessing preferences.
    In terms of levels of measurement, non-parametric methods result in "ordinal" data.
    After the introduction to the topic let's turn to an example.

    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.

    A recent quote from a thread in sci.math.symbolic:

    "FriCAS can produce various 3D plots.  Interface is not pretty, but the plots are." -- Waldek Hebisch

    I don't even care if it's true (about FriCAS). I love the sense of priorities.

    I created a procedure over a year ago to collect earthquake data from the usgs and save it into a file. The procedure pulls data off the internet and saves it in a text file with a date stamp (minus the year - because I haven't been bothered to change it ) in the folder location f:/7 day earthquakes.  Feel free to modify it as you wish.  Here it is, pretty much still in it's original format when I created it.

    earthquakedatasave := proc ()
      local a, b, c, d, e, i:

    Dr. Gilbert Lai is a mentor for the FIRST Robotics team SWAT 771. He is helping an all girls team from grades 7-12 design a basketball-shooting robot for this year’s annual FIRST Robotics Competition. Dr. Lai is using MapleSim and Maple to help the team understand the principles involved and design their robot. This blog post is part of a series that chronicles the progress of the team.  Posts in the series include:

    • Part 1 - 

    Ukaine-2012. External independent evaluation. A trial version in Maple, by Maple.
    HTML, Java-Interactive:
    http://webmath.exponenta.ru/zno_11/ranok/z.html
    Maple:2012_ranok_ru_bez.mw

    I was trying to put together a series of plots that each included multiple dataseries.  I wanted to color them to help distinguish the various curves.  When I went into Maple's help page for the "colornames" that Maple recognizes, I was surprised to find that there were no color swatches to help you pick what color you wanted to use.  So I copied the color names from the help into a worksheet and told it to plot some color swatches for me. Here is the result:

    MapleColors.mw 

     

    Note that the fixed width web page is cutting off two columns of colors.  Click the image to see the whole set of colors.

     

     

     

     

    Check this:

    111.mw

    Don't forget set Plot0 component manipulator to "Click and Drag" to test "on click" event. Localizing of problem takes for me ~4 days. It's terrible!

     

    ---------for stupid tags

    global

    The directional derivative of a scalar function f(x), computed in the direction u in Cartesian coordinates, is defined by

    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:

    The cost of some mathematical sites (estimated bizinformation.org):
     8.000.000 $ - wolfram.com
       372.456 $ - webmath.exponenta.ru (Russian Maple in education)
       292.301 $ - maplesoft.com

        82.342 $ - exponenta.ru
        61.278 $ - webmath.ru
        54.895 $ - math.ege
        43.302 $ - univ.kiev.ua (Kiev National University)

    First 102 103 104 105 106 107 108 Last Page 104 of 297