mmcdara

6740 Reputation

18 Badges

8 years, 186 days

MaplePrimes Activity


These are replies submitted by mmcdara

@C_R 

I should be the one to thank you for having taken the time to reply to these technical questions.
I'm really blown away by what MapleSim can do now, and those sphere cylinder contact elements are just those I needed  a few ears ago.
I hope I'll see you soon with more creations of this kind.

By the way, in case you don't already know Tadashi Tokieda's works, here is a Youtube video where it presents some physical paradoxes... new challenges for MapleSim (and you)?

@C_R 

I indeed wondered if it could be a visual artefact.

I didn't carefully read all the text of your post (my apologies) and I have a question to which you may have already given some answers. 
You mention frictional effects and I feel that the movement of the ball within the tube is governed by rolling (where no dissipation occurs) and slipping (which dissipates energy).
Is MapleSim capable of determining by itself whether the ball slips and rolls, slips without rolling, rolls without slipping or it is you who chose a priori what is about to occur?

A suggestion: Could we draw an equator and meridians on the ball to see its movement?

I'm asking this question because six or seven years ago, I worked on an industrial mechanism where a rigid ball was squeezed between two rigid surfaces with relative displacement. I did a complete study of this the behaviour of this ball using Hertz's contact theory and, as the final equations were quite complex, I thought of using MapleSim (which I was using at the time) to model and simulate the problem.
But either I wasn't competent enough or MapleSim didn't have the capabilities it should have today, so I eventually gave up.

By the way, you did (MapleSim too :-) ) quite an impressive work!

In your simulation the apex of the ball is over the tube (the ball is decending inside the tube). So there is some gyroscopic effect within the tube which eventually makes the ball doing out the tube, but during the free flight out of the tube a part if the initial kinetic energy has been consumed, and still another part when the ball was inside the tube.
How do you explain that the ball hits the ground at a distance from the tune larger than the distance between the tube and the departure point?

It looks like the total energy is not conserved (increased in fact). Did you check this?

@AHSAN 

Look to this POST

I'm done with this thread, hope this post will give you satisfaction

@Carl Love 

"There's never a need to call randomize more than once. ... My feeling about randomize is that it should only be called at the top level, never in a procedure."

I don't agree: one situation is when you have to compare in the same worksheet two (or more) samples S1 and S2, for instance produced by different algorithms.
Common Random Numbers is another situation which occurs in distributed/parallel computing.

In the first situation you have to reset the seed this way

restart
.
.
.
seed := randomize()
S1 := Statistics:-Sample(....)
.
.
.
randomize(seed)
S2 := Statistics:-Sample(....)
.
.
.

A variant is to assess the sampling effect by doing something like this

restart
.
.
.
N := ...
Result := Vector(N)
for n from 1 to N do
    seed := randomize()
    S := Statistics:-Sample(....)
    Result[n] := some_function_depending_on_S
end do:
Analyse_Result
.
.
.




In the second situation, for instance using Grid, you can have to send the seed on several nodes. If it is so the same procedure running on different nodes runs the same randomize(seed) instruction.



You may read on it:



2  0.05 produces an error because they are two symbols and  0.05 not separated by one of . , ; : (even while assuming  . is the non commutative multiplication sign then 2  0.05 would be interpreted as 2 0.05 and then produce an error because of 2 0 and the previous remark).

2 .05 is treated as 10 as, unless to the previous situation, . can be considered as a "separator" (in fact the non commutative multiplication sign) between 2 and 05, thus what you write is interpreted as which is obviously 2 .05and even as 2 .5


See how do the dot rules apply: 2015.mw

@AHSAN 

It is obvious the error comes from the lines

seq(seq(textplot(
        [i-1+(j-3/2)/4, data[i, j], evalf[3](data[i, j])]
        , font=[Tahoma, bold, 14]
        , align=`if`(data[i, j] > 0, above, below)), i=1..3), j=1..3)

Error, Matrix index out of range means you are trying to access some data[i,j] that do not exist; proof

seq(seq(data[i, j], i=1..3), j=1..3);
Error, Matrix index out of range

Finding the error requires no skill, just the willingness to fix the problem by yourself instead of activating the emergency mode and calling for help.
What are the dimension of matrix data?

LinearAlgebra:-Dimensions(data)
                              3, 2

So j must range from 1 to 2, not from 1 to 3

By the way, before asking a new question once you have discover what your plot looks like, try to fix the rendering issue by yourself.

@AHSAN 

Here is a more complex code which enables stacking boxes of different positive or "negative" heights Almost_that_2.mw

@AHSAN 

In my opinion (I will recieve soon a lot of critics saying that) Maple is rather weak to produce smart graphics compared to other products, commercial or not.
For instance you are not capable (at least with my old 2015 version) to orient the text along axis and make it rotate as the whole plot is rotated.
Placing legends like those in the right side of your plot is quite a pain as plot3d doesn't accept legends. So you have to place little spheres and texts using primitives (pointplot, textplot).

When I want to produce high quality graphics, for instance to present them in some reunion, specially when decision makers, who generally do not care about the maths details but only focus on the "beauty" of the graphics, are present, I never use Maple. 

Look at this, but keep my advice in mind: Almost_that.mw


For the record it took me about 15 to 20 minutes to produce the plot of my first reply and more than one hour to produce this latter: a product using a true graphic grammar would require a few minutes of coding for a far better rendering.

@C_R 

I asked a question a few years ago about this anames(user) stuff.
Here it is newly assigned names
Maybe you will find some ideas reading vv's and CarlLove's answer ?

This problem is a geometric Sangaku.
A collection of a few Sangaku and their solutions can be found here Sangaku ellipses or here Villemin (in french).

This specific Sangaku has been proposed by Sawa Masahoshi in 1821 (see here Geometry Beyond Algebra) and it's Solution provided by Hiroshi Kinoshita in 2018.

At that time it was considered as one of the two last unsolved Sangaku (ref Tangente [in french]).


The main problem is that any operation, even anecdotal in appearance, changes the output of unames.
For instance:

restart:
unames();  # --> sequence S1
lprint(1);
unames()   # --> sequence S2

{S2} minus {S1} = {INTERFACE_LPRINT}


restart:
unames();  # --> sequence S1
a := 1:
unames()   # --> sequence S2

{S2} minus {S1} = {Typesetting, mprintslash, INTERFACE_LPRINT, INTERFACE_RESULT}

So if the two calls to unames are very distant in your worksheet you can get  {S2} minus {S1} arbitriraly complex.
In your case the simple fact to write 

initial_unames := {%}:

generates a lot of unassigned quantities.

To see what happens I used writeto to  redirect the output  of the two successive calls to unames to two distinct text files.
I then read them both and search for the differences.

Here are a few elementary examples writeto.mw



What do you presicely want to achieve in the lines collowing # hand derivation of integral of A':

This seems weird to use a Computer Algebra System and to compute dericatives by hand.
What is A'

As you write

bin:= y -> piecewise( y<Rin,2*sqrt(Rin**2 - y**2)  ,  y>=Rin,0):

what is the need to introduce further on things like this:

Re(y*sqrt(abs(Rin^2-y^2))

?

Couldn't  y/2*bin(y) do the same thing?

Could you explain in simple words what you are aiming to do?
It seems like you want to compute some quantities (polar inertia?) of a cilyndrical tube with elliptic cross section?


BTW, I love your Rorschach avatar

@salim-barzani 

You wonder what is the true interest of what I did, don't you?
May I remember your initial question? Where did you ever speak about inserting a Maple plot within some text file to write an article?

If this was your main concern why didn't you explain yourself that clearly?

To answer your question: no, I didn't do what I did for the sake of the art, it is an application which helps drawing intereactively several expressions without having to do this by hand.
I usually don't do things because they are pretty, if you didn't see any interest at all in what I said, why did you used encouraging words like "amazing" to qualify them. If you felt this work as useless or simple BS, why didn't you say it clearly?

Whatever here is another file which explains you how you can use the output of the Maplet to export it as a jpeg file (if you don't want this format browse yourself the help pages to search for another one), possibly after some customization Maplet_5.mw

PS: as I already told you in one of our pevious exchanges, I'm fed up with answering questions that keep changing as the discussion goes on. Maybe your next one could even be "Help, can you write my article"?
So this is my last reply on this thread

@salim-barzani 

The app has been built to display functions whose indeterminates were x and y.
Here is a revised version which works whatever the names of the two indeterminates: Maplet_3_revised.mw

Be aware that you have to change the ranges by hand. Change them on this line

f(_passed[n]), vars[1] = 0..1, vars[2]=0..1  #vars[1] is the 1st indet in lexicographic order (t)
                                             #vars[2] is the 2nd indet in lexicographic order (x)

Of course the Maplet could be completed by adding TextField components to define interactively the bounds of each indeterminates.
Here is a version which enables changing the plot ranges: Maplet_4.mw

One can also think to add modifiers for the plot style and its transparency, or for any other option plot3d suppports.
This is quite simple to do. In fact the most time consuming job would be yours: it consists in writting a complete specification of the Maplet: what parameters would you want to change interactively, what are the messages to display, where must the different fields be placed... and so on.

1 2 3 4 5 6 7 Last Page 3 of 142