225 Reputation

5 Badges

4 years, 149 days

MaplePrimes Activity

These are questions asked by Stretto

How difficult is it to animate a process using a binary tree for visualization purposes, something that isn't too slow or too complex to implement(as I will then just go with python or something) but also nice to look at(not just boring straight lines).

I'd like to animate, say, a ball moving through different branchings of a multi-tree(binary mainly but ultimately different branchings per node).


As an aside. Is there anything like C++ objects/structs in maple that are easy to create using . notation?



f := n->local p := round(n) mod 2; 1/2 + (-1)^p/n/2^p;
f := proc (n) options operator, arrow; `if`(1 < modr(n-1/2, 2),

   1/2+1/n, 1/2-(1/2)/n) end proc

     f := proc (n) local p; options operator, arrow; p :=

f := n->local p := round(n) mod 2; 1/2 + (-1)^p/n/2^p;


Correct plot


Wrong plot



Can someone explain why I have to put ' ' around f to get the right plot? Clearly it has something to do with round and/or mod. Why does maple have this stupid issues? Cause it seems like it is very error prone. I know it's wrong only cause I know what to expect.

4 %+ 3 %* 2;
                        %*(%+(4, 3), 2)

= (4+3)*2

It makes using % very difficult in complex expressions because one has to constantly use a ton of paranethesis just to get things to work out.

1 + 4%^3  %* 2 %- 6 %/ 4;

1 + ((((4 %^ 3) %* 2) %- 6) %/ 4)

= 1 + (4^3*2 - 6)/4

plot(['h'(floor(n))[1], 'h'(floor(n))[2]],n=1..10);
Error, (in plot) ifactors takes an integer or a factored integer


h simply uses ifactors. I can calculate with it no problem, e.g., h(3), h(10)... but in plot it does not work. I've tried convert, Integer, etc and nothing works.

I was plotting some 3d stuff and wanted to animate it. I used orientation in the plot3d to get the orientation I wanted. When trying to animate them the orientation is ignored.

Specifically though I'm suing Pk = plot3d(...);
then animate(display, [P1, ..., Pn]);

(more or less, my real code is more complex but that is the idea).

Where can I tell animate to use a specific orientation? I tried adding it to the options of display but it didn't work either. Seems animate and display completely ignore orientation.




2 3 4 5 6 7 8 Last Page 4 of 16